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.IEnumerable1[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,bool)
Google.GradleWrapper:Extract (Google.Logger)
GooglePlayServices.GradleResolver:GradleResolution (string,string,bool,bool,System.Action1<System.Collections.Generic.List
1<Google.JarResolver.Dependency>>)
GooglePlayServices.GradleResolver:smile:oResolutionUnsafe (string,bool,System.Action)
GooglePlayServices.GradleResolver/c__AnonStorey13:<>m__1D ()
Google.RunOnMainThread:ExecuteNext ()
Google.RunOnMainThread:m__A ()
Google.RunOnMainThread:RunAction (System.Action)
Google.RunOnMainThread:ExecuteAll ()
Google.RunOnMainThread:Run (System.Action,bool)
GooglePlayServices.GradleResolver:smile:oResolution (string,bool,System.Action)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe (System.Action1<bool>,bool,bool,bool) GooglePlayServices.PlayServicesResolver/<ScheduleResolve>c__AnonStorey1E:<>m__3F () GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob () GooglePlayServices.PlayServicesResolver:ScheduleResolve (bool,bool,System.Action
1,bool)
GooglePlayServices.PlayServicesResolver:AutoResolve (System.Action)
GooglePlayServices.PlayServicesResolver:m__47 ()
Google.RunOnMainThread:ExecutePollingJobs ()
Google.RunOnMainThread: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