Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Android Resolver jar not found

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

  1. ziyo100

    ziyo100

    Joined:
    Apr 13, 2021
    Posts:
    6
    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 ()
    upload_2023-5-31_11-41-40.png
    I dont know if this is the cause but I have seen people selecting the JDK from AndroidPlayer/Tools/OpenJDK/Windows
    upload_2023-5-31_11-46-48.png
    But in my case OpenJDK is not in AndroidPlayer/Tools but its directly inside of AndroidPlayer
    upload_2023-5-31_11-47-1.png
    and there is no Windows in the OpenJDK folder
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,108
    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.

    https://forum.unity.com/threads/cant-build-for-android.1306098/

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

    https://forum.unity.com/threads/aab...y-2021-3-8-with-jdk-1-8.1322211/#post-8551193

    Android Gradle errors and other related stuff:

    https://forum.unity.com/threads/unity-gradle-bug-please-help.1368018/#post-8625789
     
  3. ziyo100

    ziyo100

    Joined:
    Apr 13, 2021
    Posts:
    6
    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.
  4. unity_E7171BA179B765984F16

    unity_E7171BA179B765984F16

    Joined:
    Aug 29, 2023
    Posts:
    2
    Sevgili ziyo100

    "Ayrıca sistem değişkenlerini JAVA_HOME ve JDK_HOME adlarıyla eklediğinizden emin olun" Bu nasıl oldu, lütfen bana söyleyin
     
  5. unity_E7171BA179B765984F16

    unity_E7171BA179B765984F16

    Joined:
    Aug 29, 2023
    Posts:
    2