Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Android Resolver jar not found

Discussion in 'Editor & General Support' started by ziyo100, May 31, 2023.

  1. ziyo100


    Apr 13, 2021
    I have the correct JDK version that comes with unity(2022.2.21f1) I have tried everything but still get this error.

    Failed with exception GooglePlayServices.JavaUtilities+ToolNotFoundException: jar not found.
    at GooglePlayServices.JavaUtilities.FindJavaTool (System.String javaTool) [0x0009a] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0
    at GooglePlayServices.JavaUtilities.get_JarBinaryPath () [0x00000] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0
    at GooglePlayServices.PlayServicesResolver.ExtractZip (System.String zipFile, System.Collections.Generic.IEnumerable`1[T] extractFilenames, System.String outputDirectory, System.Boolean update) [0x000cb] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0
    UnityEngine.Debug:Log (object)
    Google.Logger:Log (string,Google.LogLevel)
    GooglePlayServices.PlayServicesResolver:Log (string,Google.LogLevel)
    GooglePlayServices.PlayServicesResolver:ExtractZip (string,System.Collections.Generic.IEnumerable`1<string>,string,bool)
    Google.GradleWrapper:Extract (Google.Logger)
    GooglePlayServices.GradleResolver:GradleResolution (string,string,bool,bool,System.Action`1<System.Collections.Generic.List`1<Google.JarResolver.Dependency>>)
    GooglePlayServices.GradleResolver:DoResolutionUnsafe (string,bool,System.Action)
    GooglePlayServices.GradleResolver/<DoResolution>c__AnonStorey13:<>m__1D ()
    Google.RunOnMainThread:ExecuteNext ()
    Google.RunOnMainThread:<ExecuteAll>m__A ()
    Google.RunOnMainThread:RunAction (System.Action)
    Google.RunOnMainThread:ExecuteAll ()
    Google.RunOnMainThread:Run (System.Action,bool)
    GooglePlayServices.GradleResolver:DoResolution (string,bool,System.Action)
    GooglePlayServices.PlayServicesResolver:ResolveUnsafe (System.Action`1<bool>,bool,bool,bool)
    GooglePlayServices.PlayServicesResolver/<ScheduleResolve>c__AnonStorey1E:<>m__3F ()
    GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob ()
    GooglePlayServices.PlayServicesResolver:ScheduleResolve (bool,bool,System.Action`1<bool>,bool)
    GooglePlayServices.PlayServicesResolver:AutoResolve (System.Action)
    GooglePlayServices.PlayServicesResolver:<ScheduleAutoResolve>m__47 ()
    Google.RunOnMainThread:ExecutePollingJobs ()
    Google.RunOnMainThread:<ExecuteAll>m__A ()
    Google.RunOnMainThread:RunAction (System.Action)
    Google.RunOnMainThread:ExecuteAll ()
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    I dont know if this is the cause but I have seen people selecting the JDK from AndroidPlayer/Tools/OpenJDK/Windows
    But in my case OpenJDK is not in AndroidPlayer/Tools but its directly inside of AndroidPlayer
    and there is no Windows in the OpenJDK folder
  2. Kurt-Dekker


    Mar 16, 2013
    Google Play Services is actually even trickier to integrate than Firebase / Crashlytics, again because they're trying to be clever and automate too many of the steps, and when it fails, the failure can be incredibly mysterious and opaque to reason about. Failure modes are also incredibly dependent on all parts of your setup and toolchain.

    The best course of action might be to just start afresh in a blank project and integrate it all step by step, working from a legitimate tutorial or guide.

    How to troubleshoot build failures:

    First, make a blank project with a single blank scene and prove that it builds successfully.

    If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

    Until you can build a blank project to the target platform, don't fiddle with anything else.

    Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

    Most often things that prevent building are third-party libraries such as Firebase.

    Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

    It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

    Android build not building:

    Recently (circa July 2022) there have been reports of Unity's installer failing to install the Android Tools.

    Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022:

    Android Gradle errors and other related stuff:
  3. ziyo100


    Apr 13, 2021
    I was somehow able to solve the problem after 10 hours but I am not sure how I did it but I think it was after deleting the resolver and downloading google's external dependency manager and I think that did the trick. Also made sure to add system variables by the names of JAVA_HOME and JDK_HOME and that seemed to solve it for me
    Kurt-Dekker likes this.