- Unity: устранение зависимостей Android. Невозможно импортировать любой плагин
- 3 ответа
- Resolving Android Dependencies: Job failed: temp file/dir is not empty #198
- Comments
- sampenguin commented Mar 24, 2019
- sampenguin commented Mar 24, 2019
- sampenguin commented Mar 24, 2019 •
- a-maurice commented Mar 25, 2019
- sampenguin commented Mar 25, 2019 •
- a-maurice commented Mar 25, 2019
- sampenguin commented Mar 26, 2019
- sampenguin commented Mar 26, 2019
- AndroidX dependencies are not automatically added in Unity 2020.1 with the Firebase 6.16.0 SDK when using a mainTemplate.gradle #810
- Comments
- patm1987 commented Oct 5, 2020
- [REQUIRED] Please fill in the following fields:
- [REQUIRED] Please describe the issue here:
- Steps to reproduce:
- Relevant Code:
- vimanyu commented Oct 6, 2020
- patm1987 commented Oct 6, 2020
- vimanyu commented Oct 6, 2020
- vimanyu commented Nov 3, 2020
- Unity freezes when trying to do an initial Resolve with AdMob #109
- Comments
- sklondon commented Mar 27, 2018
- stewartmiles commented Mar 27, 2018
Unity: устранение зависимостей Android. Невозможно импортировать любой плагин
У меня огромная проблема. По какой-то причине я не могу импортировать практически любой плагин в свой проект Unity. Всякий раз, когда импорт заканчивается, я получаю экран Resolving Android Dependencies, который фактически никогда не решает проблему. Я недавно получил эту проблему, когда импортировал подключаемый модуль Unity Mediation, и теперь я переустановил свои Android Studio, Java и Unity, что привело к той же ошибке, но теперь даже для подключаемых модулей, которые работали раньше. Я понятия не имею, что делать. После переустановки мне пришлось понизить инструменты SDK до 25.0.5, или я не смог собрать проект из-за ошибки JAVA_HOME в редакторе Unity. Все остальное актуально.
Любая помощь приветствуется.
3 ответа
Ну . проблема была в том, что в папке моего проекта были пробелы. Если это было тестовое приложение, это должен был быть TestApp. Когда я создавал свой проект в Unity (это мой первый проект), я пренебрегал тем, что имя Project также используется в качестве имени папки. Я понимал, как весь двигатель работает наизнанку в безнадежных попытках исправить это, но никогда не подозревал, что это было так просто.
Не уверен, что это поможет или вызовет больше проблем — как я скоро выясню, я думаю, но если у вас уже установлен пакет Play Services вместе с Play Services Resolver, который идет с ним . при импорте пакета AdMobs убедитесь, что что вы снимаете флажок Play Services Resolver перед импортом, поскольку он уже установлен. Я считаю, что вы можете управлять / обновлять Play Services Resolver из меню «Ресурсы», если необходимо.
Источник
Resolving Android Dependencies: Job failed: temp file/dir is not empty #198
Comments
sampenguin commented Mar 24, 2019
I’m getting this exception constantly when PlayServicesResolver attempts to run. I’ll see a few popup windows that say Resolving Android Dependencies, Unity will chug for a few seconds, and then I get left with a tiny progress bar window that never goes away and this exception in the log. It happens right after «Assets\PlayServicesResolver\Editor\play-services-resolver.txt metadata will be checked» shows in the console window.
Any time I make a change requiring a recompile, it goes through this process again, which basically grinds my development to a halt. Have tried restarting Unity, deleting Temp dir contents, but it’s apparently something that Resolving Android Dependencies generates on its own. Any ideas on a workaround or what may be causing this?
Happens in Unity 2018.3.9f1 and Unity 2018.3.1f1. I have GoogleMobileAds and GooglePlayGames in this project, managed via EasyMobilePro.
The text was updated successfully, but these errors were encountered:
sampenguin commented Mar 24, 2019
After battling this for days and posting this issue, then I just found a workaround/solution.
I removed PlayServicesResolver from my Unity project, then reimported the package. This time, I got a different exception:
So then I deleted that «com.android.support.support-vector-drawable-26.1.0.aar» file, and kicked off another compile to initiate the resolver again. This time resolving android dependencies completed, and now I see about 20 new files in my Plugins/Android directory.
My guess is that aar was corrupted somehow, and the resolver got hung up on it in some way. It was redownloaded as part of the resolution.
sampenguin commented Mar 24, 2019 •
Scratch that. It’s intermittent, still a problem. It fails randomly with attempted deletion of randomly generated named dirs in the Temp dir, or sharing violations on random .aar files. Guess I just got lucky that one time.
If it’s useful, I’m on an SSD and pretty fast multicore rig (Threadripper). I’m wondering if this is a multithreaded process if something is happening too fast in IO. Or conversely, if there’s some IO hitch that’s preventing a dir from being deleted when it’s not empty yet. Stab in the dark but I can’t think what would be causing this behavior.
a-maurice commented Mar 25, 2019
Definitely sounds like something odd is happening during it. If you can, could in the toolbar go to Assets > Play Services Resolver > Android Resolver > Settings, enable «Verbose Logging», and share that? It will become a lot chattier, but that might help identify why it is getting hung up where it is. Also, if it is blocking your development, you can disable auto-resolution, but that will likely prevent your Android builds from working, since it won’t be grabbing the necessary aars.
sampenguin commented Mar 25, 2019 •
OK.
I see this towards the end:
Command completed: Successfully executed ‘
\Temp\PlayServicesResolverGradle\gradlew.bat -b [lots of other stuff]’
Then followed by a bunch of «Extracting .aar to. » messages,
Then the «is not empty» exception as reported in original post. It’s random which aar extraction it happens on, and sometimes it doesn’t happen.
FYI, yesterday I also copied the whole project to a standard HDD with plenty of room (after updating SSD drivers and firmware to no effect), and it’s still happening on the HDD shrug.
a-maurice commented Mar 25, 2019
So, the last time this came up was #19. The problem then seemed to be an anti-virus program preventing the deletion of those temporary files. Do you think that might be causing your problem?
sampenguin commented Mar 26, 2019
Funny you mention that, I just had that exact thought and went to look at my AV, but I’ve already had real time scanning disabled on my development directories on both the SSD and HDD for a long time. I can still try disabling it altogether and see if I can reproduce.
One other observation that might help to reproduce it: it seems like if I delete an aar file, then hit play in the editor (I do this to kick off a resolution because selecting Resolve and Force Resolve in the Assets->Play Services Resolver menu drop down both do nothing after getting the exception), then rapidly hit play again to stop in editor, it seems to happen more often. My last successful resolution I did with just hitting play once, letting the resolve finish (takes about 10-20 seconds), and then hitting play again to stop. So maybe something with Unity doing things in the Temp folder at the same time as the Resolver could be a contributing factor.
sampenguin commented Mar 26, 2019
Debunked that theory. Randomly get the exception whether I let it try to finish before stopping play or not.
Another odd thing, I’ve had two successful resolutions out of the last 10 tries. I think I have to delete everything in /Temp (except UnityLockFile) first, then let the resolver run without doing anything else to get success.
On the first successful resolution (log showed Resolution Succeeded and no exception), it left 3 exploded directories instead of .aar files in Plugins/Android/ (e.g. com.google.games.gpgs-plugin-support-0.9.62/ instead of the corresponding .aar file), while all the other aar files (
25 of them) still exist as singular files.
On the second successful resolution (log showed Resolution Succeeded and no exception), there were not any exploded directories, and the previously exploded 3 directories were now still there as .aar files.
Источник
AndroidX dependencies are not automatically added in Unity 2020.1 with the Firebase 6.16.0 SDK when using a mainTemplate.gradle #810
Comments
patm1987 commented Oct 5, 2020
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2020.1.6f1
- Firebase Unity SDK version: 6.16.0
- Source you installed the SDK: Unity Package Manager (.unitypackage or Unity Package Manager)
- Problematic Firebase Component: Database (Auth, Database, etc.)
- Other Firebase Components in use: Database (Auth, Database, etc.)
- Additional SDKs you are using: none (Facebook, AdMob, etc.)
- Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)
- Platform you are targeting: Android (iOS, Android, and/or desktop)
- Scripting Runtime: Mono (Mono, and/or IL2CPP)
[REQUIRED] Please describe the issue here:
When building a Firebase project (in this case, the Database test app) with a mainTemplate.gradle , I get the following issue:
It will go away if I also generate a gradleTemplate.properties file with android.useAndroidX=true in it or if I delete the mainTemplate.gradle file.
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Steps to reproduce:
- Check out one of the test apps (I used the Database one).
- Add a mainTemplate.gradle file
Restart Unity (you may get a resolution failed error if you don’t perform this step) - Click «Build And Run» for Android
Android Resolver Settings:
Workaround (if you need a mainTemplate.gradle file, it works fine without one):
- Also generate a gradleTemplate.properties file:
- Add android.useAndroidX=true to the end of it. Note that just generating this file is not enough, but it must be modified as well.
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What’s the issue repro rate? 100%
If you have a downloadable sample project that reproduces the bug you’re reporting, you will
likely receive a faster response on your issue.
Relevant Code:
The text was updated successfully, but these errors were encountered:
vimanyu commented Oct 6, 2020
I could not reproduce this on my end. I tried both in 2019.4 and 2020.2. Here are the steps I followed,
- Fresh checkout of Unity firebase database quickstart testapp
- Launch Unity (2019 or 2020)
- Player Settings -> Settings for Android -> Publishing Settings -> Enable Custom Gradle Template
- Add Google Package Registry (manually modifying Package.manifest in 2019 and using Project Settings -> Package Manager -> Scoped Registries in 2020)
- Install Firebase Database via UPM
- Assets -> External Dependency Manager -> Android Resolver -> Settings -> Enable «Use Jetifier»
- Assets -> External Dependency Manager -> Android Resolver -> Force Resolve
Expected error:
- Player Settings -> Settings for Android -> Publishing Settings -> Enable Custom Gradle Properties Template
- Force Resolve again (should be successful)
- Build
Error on first build:
- Restart Unity -> Build
Everything works aside from that build error on first time builds.
patm1987 commented Oct 6, 2020
After some experimenting, I have verified that a «Force Resolve» after generating a gradleTemplate.properties file does add the necessary entries:
vimanyu commented Oct 6, 2020
Talking to @patm1987, the difference was that I ran a «Force resolve» before building. The bug here is that a build should trigger this resolution automatically and that isn’t happening.
vimanyu commented Nov 3, 2020
There were many corner cases and we ended up resorting to a strategy to ensure we resolve dependencies atleast once «Auto resolve on Build» is enabled. There are several triggers (eg: change in Build Settings or Android Resolver settings) that dictate to the system whether it should resolve dependencies or not. Aside from that, we were also optimizing based on if the module is already loaded.
Newer versions of Unity do not reload the entire app domain. This caused our optimization to not function as expected.
Now, we are utilizing a Unity post-build callback to reset things after a build. The issue is that this reset only happens after a successful build. If the build fails, it is highly advisable to manually «Force Resolve» from the menu.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Unity freezes when trying to do an initial Resolve with AdMob #109
Comments
sklondon commented Mar 27, 2018
Hi — Unity freezes when trying to do an initial Resolve with AdMob, and «mobileadssdk-advisor+support|at|google.com» at google-admob-ads-sdk says «It is possible that the issue is with the Google Play Services Resolver which is a dependency of our plugin, so I would suggest that you also open an issue on their Issue Tracker.» Here I am, and I’d genuinely appreciate any suggestions. thanks. -k
I am using the latest Unity release 2017.1.Of3 64 bit
Following the directions and links on Google’s «Get Started» page at https://developers.google.com/admob/unity/start
Sourcing the Google Unity package at https://github.com/googleads/googleads-mobile-unity
Tried the fix at https://answers.unity.com/questions/1347425/problem-with-adds-play-services.html
Tried the fix at https://github.com/googlesamples/unity-jar-resolver/blob/master/play-services-resolver-1.2.64.0.unitypackage
The issue is as follows:
- Unity installs the AdMob package without drama;
- But when you go to begin to Resolve, the drop down menu is slightly different from Google’s instructions,
«Resolve client jars» is missing
The dropdown’s choices are «Resolve» and «Force Resolve» - On clicking «Resolve» an empty DOS window comes up and closes 30 seconds later;
- then a Windows Loading Bar window titled «Resolving» opens.
- Finally, the Resolve progress bar doesn’t indicate any progress at all, no matter how long you leave it.
I’m a noob, many thanks for any help
k
The text was updated successfully, but these errors were encountered:
stewartmiles commented Mar 27, 2018
@sklondon what happens if you enable verbose logging in the Android Resolver settings and check the Unity log file? It would be useful to understand where it’s hanging, it simply runs Gradle so perhaps your machine is configured in a way that breaks Gradle?
Источник