Beginner_
Beginner_

Reputation: 695

"Resolution Failed! You application will not run, see the log for details"

I'm trying to run Force Resolve with Firebase, but it fails and doesn't work.

Resolution Failed!

JAVA_HOME of Windows is also set to the latest JDK, and the JDK in Unity uses the one prepared by Unity (JDK Installed with Unity is true).

I don't know what other information is needed. What should I do?


Gradle failed to fetch dependencies.
Failed to run 'C:\UnityProjects\UnityProjectName\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\UnityProjects\UnityProjectName\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Editor/2019.2.6f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\UnityProjects\UnityProjectName\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/UnityProjects/Craft%20Offensive/Assets/Firebase/m2repository" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-analytics:17.2.0;com.google.firebase:firebase-iid:[20.0.0];com.google.firebase:firebase-analytics-unity:6.6.0;com.google.firebase:firebase-common:19.1.0;com.google.firebase:firebase-app-unity:6.6.0;com.google.firebase:firebase-auth:19.0.0;com.google.firebase:firebase-auth-unity:6.6.0;com.google.firebase:firebase-database:19.1.0;com.google.firebase:firebase-database-unity:6.6.0;com.google.firebase:firebase-messaging:20.0.0;com.google.firebase:firebase-messaging-unity:6.6.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=3.4.0"'
stdout:
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_161
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
stderr:
exit code: 1
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/Logger.cs:103)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:957)
GooglePlayServices.<GradleResolution>c__AnonStorey1:<>m__2(Result) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:369)
GooglePlayServices.<GradleResolution>c__AnonStorey2:<>m__0() (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:468)
Google.RunOnMainThread:ExecuteNext() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
Google.RunOnMainThread:Run(Action, Boolean) (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
GooglePlayServices.<GradleResolution>c__AnonStorey1:<>m__8(Result) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:468)
GooglePlayServices.ProgressReporter:SignalComplete() (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116)
GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
GooglePlayServices.<RunAsync>c__AnonStorey1:<>m__0() (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/CommandLine.cs:137)
Google.RunOnMainThread:ExecuteNext() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

 

Resolution failed
Failed to fetch the following dependencies:
com.google.firebase:firebase-analytics:17.2.0
com.google.firebase:firebase-iid:[20.0.0]
com.google.firebase:firebase-analytics-unity:6.6.0
com.google.firebase:firebase-common:19.1.0
com.google.firebase:firebase-app-unity:6.6.0
com.google.firebase:firebase-auth:19.0.0
com.google.firebase:firebase-auth-unity:6.6.0
com.google.firebase:firebase-database:19.1.0
com.google.firebase:firebase-database-unity:6.6.0
com.google.firebase:firebase-messaging:20.0.0
com.google.firebase:firebase-messaging-unity:6.6.0
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/Logger.cs:103)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:957)
GooglePlayServices.GradleResolver:LogMissingDependenciesError(List`1) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:91)
GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey6:<>m__1(List`1) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:760)
GooglePlayServices.<GradleResolution>c__AnonStorey1:<>m__0() (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:295)
GooglePlayServices.<GradleResolution>c__AnonStorey1:<>m__2(Result) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:372)
GooglePlayServices.<GradleResolution>c__AnonStorey2:<>m__0() (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:468)
Google.RunOnMainThread:ExecuteNext() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
Google.RunOnMainThread:Run(Action, Boolean) (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
GooglePlayServices.<GradleResolution>c__AnonStorey1:<>m__8(Result) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:468)
GooglePlayServices.ProgressReporter:SignalComplete() (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116) GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
GooglePlayServices.<RunAsync>c__AnonStorey1:<>m__0() (at Z:/tmp/tmp.CbcF1w0aJu/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/CommandLine.cs:137)
Google.RunOnMainThread:ExecuteNext() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.cfOHeQ7pJN/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Firebase Analytics and Auth

I also use Firebase Analytics with Auth. I imported Analytics first into my project and then Auth. At that time, I was warned to delete some Analytics files. I then allowed those files to be deleted.

I also imported Analytics again and tried to import Auth. I skipped the warning and left the file.

But the error remains both.

Upvotes: 1

Views: 2316

Answers (1)

Patrick Martin
Patrick Martin

Reputation: 3131

I actually don't have JAVA_HOME setup on my Windows machine but have javac in my path. Just removing that variable might be enough to get you unstuck.

I will also throw in that I tend to want to do a full logout when changing environment variables to make sure there's nothing holding on to old stuff.

In your comments, I see that others have suggested checking your architecture (x86 vs x64). I would also suggest making sure the JAVA_HOME matches javac (what's in your PATH). You can easily find this in powershell with get-command javac.

Whatever solves your issue, if any of this does, this sounds a lot like a bug. I would recommend filing an issue against the unity-jar-resolver repository or with Firebase Support directly. Include any steps you've tried, this thread, and a workaround if anything here helps. I found this semi-related bug, but I'm pretty sure you're running into something different.

Upvotes: 2

Related Questions