Unity editor version: 2019.4.9
Firebase Unity SDK version: 6.15.2
Source you installed the SDK (.unitypackage or Unity Package Manager): Unity Package Manager
Firebase plugins in use (Auth, Database, etc.): Auth, Database
Additional SDKs you are using (Facebook, AdMob, etc.):
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): Android
Scripting Runtime (Mono, and/or IL2CPP): Mono
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Gradle failed to fetch dependencies.
Failed to run '/Users/eunsong/Desktop/test/Temp/PlayServicesResolverGradle/gradlew --daemon -b "/Users/eunsong/Desktop/test/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=/Applications/Unity/Hub/Editor/2019.4.9f1/PlaybackEngines/AndroidPlayer/SDK" "-PTARGET_DIR=/Users/eunsong/Desktop/test/Assets/Plugins/Android" "-PMAVEN_REPOS=file:////Users/eunsong/Desktop/test/Library/PackageCache/com.google.firebase.[email protected]/Firebase/m2repository;file:////Users/eunsong/Desktop/test/Library/PackageCache/com.google.firebase.[email protected]/Firebase/m2repository;file:////Users/eunsong/Desktop/test/Library/PackageCache/com.google.firebase.[email protected]/Firebase/m2repository" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-common:19.3.0;com.google.firebase:firebase-analytics:17.4.1;com.google.firebase:firebase-app-unity:6.15.2;com.google.firebase:firebase-auth:19.3.1;com.google.firebase:firebase-auth-unity:6.15.2;com.google.firebase:firebase-database:19.3.0;com.google.firebase:firebase-database-unity:6.15.2" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=3.4.0"'
stdout:
stderr:
FAILURE: Build failed with an exception.
What went wrong:
Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated.
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 0s
exit code: 1
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/Logger.cs:136)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/PlayServicesResolver.cs:990)
GooglePlayServices.
GooglePlayServices.
Google.RunOnMainThread:ExecuteNext() (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:486)
Google.RunOnMainThread:
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested(Boolean) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:512)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:310)
Resolution failed
Failed to fetch the following dependencies:
com.google.firebase:firebase-common:19.3.0
com.google.firebase:firebase-analytics:17.4.1
com.google.firebase:firebase-app-unity:6.15.2
com.google.firebase:firebase-auth:19.3.1
com.google.firebase:firebase-auth-unity:6.15.2
com.google.firebase:firebase-database:19.3.0
com.google.firebase:firebase-database-unity:6.15.2
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/Logger.cs:136)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/PlayServicesResolver.cs:990)
GooglePlayServices.GradleResolver:LogMissingDependenciesError(List1) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/GradleResolver.cs:95)
GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey8:<>m__1(List1) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/GradleResolver.cs:912)
GooglePlayServices.
GooglePlayServices.
GooglePlayServices.
Google.RunOnMainThread:ExecuteNext() (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:486)
Google.RunOnMainThread:
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested(Boolean) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:512)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:310)
When I try to build my project to Android version, but Gradle fail and resolution fail happen all the time..
I tried to make another project and import all assets but the errors didn't disappear.
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What's the issue repro rate? (eg 100%, 1/5 etc)
Hi @ccssong ,
I think this might be related to some issues we have seen in the past and looks like an issue with groovy which is fixed in latest versions of gradle. Please see if the steps in these existing tickets help you. We will update the gradle version in EDM4u soon after some testing.
Issue 384
https://github.com/googlesamples/unity-jar-resolver/issues/379
Let us know if this works for you and we can close this ticket as a duplicate.
Hi @ccssong,
Did you have time to test if the workarounds in other ticket (updating to Java 8 or manually gradle version) work for you? Would be nice to know if theses issues are related.
I've tried updating Java JDK to version 8 and manually upgrade gradle, but I still get a resolution fail.
However, this time the error message says differently, having errors on auth and database.
Here is the error message.
Resolution failed
Failed to fetch the following dependencies:
com.google.firebase:firebase-app-unity:+
com.google.firebase:firebase-auth-unity:+
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/Logger.cs:136)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/PlayServicesResolver.cs:990)
GooglePlayServices.GradleResolver:LogMissingDependenciesError(List1) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/GradleResolver.cs:95)
GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey8:<>m__1(List1) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/GradleResolver.cs:912)
GooglePlayServices.
GooglePlayServices.
GooglePlayServices.
Google.RunOnMainThread:ExecutePollingJobs() (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:409)
Google.RunOnMainThread:
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested(Boolean) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:PollOnUpdateUntilComplete(Func1, Boolean) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:379)
GooglePlayServices.PlayServicesResolver:LabelAssets(IEnumerable1, Action1, Boolean, Action2, Boolean, Boolean) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/PlayServicesResolver.cs:2191)
GooglePlayServices.GradleResolver:ProcessAar(String) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/GradleResolver.cs:1413)
GooglePlayServices.
Google.RunOnMainThread:ExecutePollingJobs() (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:409)
Google.RunOnMainThread:
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested(Boolean) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:PollOnUpdateUntilComplete(Func1, Boolean) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:379)
GooglePlayServices.PlayServicesResolver:LabelAssets(IEnumerable1, Action1, Boolean, Action2, Boolean, Boolean) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/PlayServicesResolver.cs:2191)
GooglePlayServices.GradleResolver:ProcessAar(String) (at Z:/tmp/tmp.tTnUzlmpWj/third_party/unity/unity_jar_resolver/source/AndroidResolver/src/GradleResolver.cs:1413)
GooglePlayServices.
Google.RunOnMainThread:ExecutePollingJobs() (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:409)
Google.RunOnMainThread:
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested(Boolean) (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.XfMocxCBgW/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:512)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:310)
Also, when I do force resolving, the same warning is poped up
Some conflicting dependencies were found.
The following dependency versions were modified:
com.google.firebase:firebase-app-unity:6.15.2 --> com.google.firebase:firebase-app-unity:+
com.google.firebase:firebase-auth-unity:6.15.2 --> com.google.firebase:firebase-auth-unity:+
I think the below image makes the problem.
I found a firebase related file in Firebase > Editor > DatabaseDependencies.xml in my project folder. It describes some firebase libraries version, and it is weird. The first android package one is "firebase-database:19.3.0" and the second one is "firebase-database-unity:6.15.2". Do I have to change or delete one of their version?

So the DatabaseDependencies.xml file looks fine to me. One of the packages is a normal android package and the other is a unity specific android package. Is there any more information in the logs, especially the error under the "What went wrong" section?
Unfortunately, I can't reproduce this error on my box. I haven't updated my gradle version and the database unity quickstart example works. Maybe try reverting to default gradle version but keep Java 8.
Also, does the database quickstart example work for you? Would be good to know as I will have some info to work with to try and reproduce this on my end.
Hi @ccssong
First of all, I actually recommend against upgrading Gradle to 6 since it has many breaking changes that the gradle script in EDM4U probably not supported yet, especially changes in version range definition. Using Java 8 should be sufficient.
Regarding the error, that is emitted from this line of code.
That means the gradle script is not able to download/copy aar files to Assets/Plugins/Android/ folder.
It is never good to see com.google.firebase:firebase-app-unity:6.15.2 --> com.google.firebase:firebase-app-unity:+. This means that EDM4U cannot find the right version for this package an choose to pick whatever versions. And we actually ship this package inside the UPM package/.unitypackage itself. That is, something apparently went wrong here. If you are using Gradle 6, I recommend you to fall back to Gradle 5.
Please allow us to collect a bit more information from you to understand the nature of the issue.
ProjectSettings/GvhProjectSettings.xml. This contains your settings for EDM4U and can helps us to understand if any flags is changed from default value. In general, we recommend you to use the default values unless you prefer to resolve manually.Assets > External Dependency Manager > Android Resolver > Display Libraries. This gives us some idea about which libraries EDM4U is trying to resolve.Verbose Logging in Assets > External Dependency Manager > Android Resolver > Settings. You might need to scroll down a bit to see this option. After you save the settings, please do Force Resolve again and send us the editor log.Tips: Instead of pasting everything to this post, please save those log in some online storage and reference those files as urls. This will save us some scrolling. :)
Thank you @chkuang-g
I downgraded Gradle from 6 to 5.
GvhProjectSettings.xml
https://github.com/ccssong/baekjoon/blob/master/error/first.xml
Dispaly Libraries. It's weird because all of information related to firebase libraries is duplicated in two.
https://github.com/ccssong/baekjoon/blob/master/error/second.txt
I tuned on Verbose Logging. Here is Editor https://github.com/ccssong/baekjoon/blob/master/error/third.txt
@ccssong
Thanks for offering the information! I think I know what is happening here.
TL;DR; The culprit is Assets/Firebase/m2repository folder. It was not removed properly and would cause EDM4U to malfunction. Removing it should fix your problem. Also check your Assets folder and make sure no Firebase SDK is still in it. Here is a checklist for you.
Assets/FirebaseAssets/ParseAssets/Plugins/Android/FirebaseAssets/Plugins/iOS/FirebaseAssets/ExternalDependencyManagerAssets/PlayServicesResolverLonger Explanation: You said you installed Firebase through Unity Package Manager. I assumed you used Package Migrate feature to uninstalled Firebase from Assets folder, and reinstall it through Unity Package Manager.
There was a bug in EDM4U that it will apply incorrect labels to the generated files in that folder. It was fixed in the later version of EDM4U but the existing files would still have incorrect labels.
https://github.com/googlesamples/unity-jar-resolver/commit/d5c7e5ed60203f2010e7fa88ff3736800fffeeb8
After you do so, you should see something like the following in Display Libraries
maven {
url (unityProjectPath + "/Library/PackageCache/[email protected]/Firebase/m2repository") // Packages/com.google.firebase.auth/Firebase/Editor/AuthDependencies.xml:20
}
maven {
url (unityProjectPath + "/Library/PackageCache/[email protected]/Firebase/m2repository") // Packages/com.google.firebase.database/Firebase/Editor/DatabaseDependencies.xml:20
}
maven {
url (unityProjectPath + "/Library/PackageCache/[email protected]/Firebase/m2repository") // Packages/com.google.firebase.app/Firebase/Editor/AppDependencies.xml:18
}
If so, do a Force Resolve and everything should be back to normal.
Let us know if this resolves your issue.
Thank you so much @chkuang-g !!!
I did what you said and the project is built!
So far, I installed firebase sdk in Asset>import package>custom, and that seems to be the problem.
I deleted sdk and reinstall it through package manager, and troubles are solved.
Glad to know your issue is resolved. I will close this issue for now