Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Failed to determine the most recently installed Android SDK version #320

Closed
Labels
@unace

Description

Please fill in the following fields:
Unity editor version: 201930f6
Play Services Resolver version:
1.2.133
Features in Play Services Resolver in use (Android Resolver, iOS Resolver, VersionHandler, etc.):
I don't know exactly... maybe Android Resolver?
Plugins SDK in use (Firebase, Admob, Facebook, etc.):
Firebase 6.9.0
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):
IL2CPP

Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

Hi,
I got this error whenever running Unity.

I haven't installed Oracle JDK manually, but I installed Unity with Open JDK (path : /Applications/Unity/Hub/Editor/2019.3.0f6/PlaybackEngines/AndroidPlayer/OpenJDK).
Do I have to install Oracle JDK?

Please let me know if you need more information.

First log

Failed to get Java version when running /usr/bin/java
It is not be possible to verify your Java installation is new enough to compile with the latest Android SDK
Failed to run '/usr/bin/java -version'
stdout:
stderr:
No Java runtime present, requesting install.
exit code: 1
UnityEngine.Debug:LogWarning(Object)
Google.Logger:Log(String, LogLevel) (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/Logger.cs:120)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:967)
GooglePlayServices.JavaUtilities:LogJdkVersionFailedWarning(String, String) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/JavaUtilities.cs:163)
GooglePlayServices.JavaUtilities:CheckJdkForApiLevel() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/JavaUtilities.cs:189)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe(Action`1, Boolean, Boolean, Boolean) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1634)
GooglePlayServices.<ScheduleResolve>c__AnonStorey5:<>m__0() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1604)
GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1461)
GooglePlayServices.PlayServicesResolver:ScheduleResolve(Boolean, Boolean, Action`1, Boolean) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1617)
GooglePlayServices.PlayServicesResolver:AutoResolve(Action) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1134)
GooglePlayServices.PlayServicesResolver:<ScheduleAutoResolve>m__8() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1113)
Google.RunOnMainThread:ExecutePollingJobs() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:300)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:414)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:310)

Second log

Unable to list target platforms. Please make sure the android sdk path is correct. 
No Java runtime present, requesting install.
UnityEditor.Android.CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. 
/Applications/Unity/Hub/Editor/2019.3.0f6/PlaybackEngines/AndroidPlayer/SDK/tools/bin/avdmanager list target -c
stderr[
No Java runtime present, requesting install.
]
stdout[
]
exit code: 1
 at UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00033] in <501fdf9059b849939e0297808b46ab08>:0 
 at UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00017] in <501fdf9059b849939e0297808b46ab08>:0 
 at UnityEditor.Android.AndroidSDKTools.RunAndroidSdkTool (System.String toolName, System.String arguments, System.Boolean updateCommand, System.String errorMsg, System.String toolsDir) [0x0007a] in <501fdf9059b849939e0297808b46ab08>:0 
 at UnityEditor.Android.AndroidSDKTools.RunAndroidSdkTool (System.String toolName, System.String arguments, System.Boolean updateCommand, System.String errorMsg) [0x00001] in <501fdf9059b849939e0297808b46ab08>:0 
 at UnityEditor.Android.AndroidSDKTools.ListTargetPlatforms () [0x00009] in <501fdf9059b849939e0297808b46ab08>:0 
System.Reflection.MethodBase:Invoke(Object, Object[])
GooglePlayServices.UnityCompat:FindNewestInstalledAndroidSDKVersion() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/UnityCompat.cs:263)
GooglePlayServices.UnityCompat:GetAndroidTargetSDKVersion() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/UnityCompat.cs:121)
GooglePlayServices.PlayServicesResolver:CanEnableJetifierOrPromptUser(String) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:2314)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe(Action`1, Boolean, Boolean, Boolean) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1635)
GooglePlayServices.<ScheduleResolve>c__AnonStorey5:<>m__0() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1604)
GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1461)
GooglePlayServices.PlayServicesResolver:ScheduleResolve(Boolean, Boolean, Action`1, Boolean) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1617)
GooglePlayServices.PlayServicesResolver:AutoResolve(Action) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1134)
GooglePlayServices.PlayServicesResolver:<ScheduleAutoResolve>m__8() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1113)
Google.RunOnMainThread:ExecutePollingJobs() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:300)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:414)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:310)

Third log

Failed to determine the most recently installed Android SDK version. Please report this as a bug with the version of Unity you are using at: https://github.com/googlesamples/unity-jar-resolver/issues Resorting to reading a fallback value from the editor preferences GooglePlayServices.PlatformVersionFallback: 25
UnityEngine.Debug:LogWarning(Object)
GooglePlayServices.UnityCompat:WarnOnAndroidSdkFallbackVersion() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/UnityCompat.cs:239)
GooglePlayServices.UnityCompat:FindNewestInstalledAndroidSDKVersion() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/UnityCompat.cs:314)
GooglePlayServices.UnityCompat:GetAndroidTargetSDKVersion() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/UnityCompat.cs:121)
GooglePlayServices.PlayServicesResolver:CanEnableJetifierOrPromptUser(String) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:2314)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe(Action`1, Boolean, Boolean, Boolean) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1635)
GooglePlayServices.<ScheduleResolve>c__AnonStorey5:<>m__0() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1604)
GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1461)
GooglePlayServices.PlayServicesResolver:ScheduleResolve(Boolean, Boolean, Action`1, Boolean) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1617)
GooglePlayServices.PlayServicesResolver:AutoResolve(Action) (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1134)
GooglePlayServices.PlayServicesResolver:<ScheduleAutoResolve>m__8() (at Z:/tmp/tmp.xf9HY6bEAq/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1113)
Google.RunOnMainThread:ExecutePollingJobs() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:300)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:414)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.D3TY3fsrzI/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:310)

Please answer the following, if applicable:
100%

repro steps

  1. prepare Mac that doesn't have /usr/bin/java.
  2. install Unity 201930f6
  3. download Firebase Unity SDK 6.9.0
  4. create a Unity 3D project
  5. import Firebase package
  6. switch target platform to Android
  7. reopen the project

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /