Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK and SDK Path Issue in Unity 2019.3.1f1 #323

Closed
jazib-shahzad opened this issue Feb 13, 2020 · 12 comments
Closed

JDK and SDK Path Issue in Unity 2019.3.1f1 #323

jazib-shahzad opened this issue Feb 13, 2020 · 12 comments

Comments

@jazib-shahzad
Copy link

jazib-shahzad commented Feb 13, 2020

I installed Unity version 2019.3.1f1 from the unity Hub and I selected android sdk and jdk while installing from Hub.
I have set the variable path in enviroment variables same as in unity:
image

image

After opening a project in Unity it gives me this error:
Warning Log1:
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 /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:239)
GooglePlayServices.UnityCompat:FindNewestInstalledAndroidSDKVersion() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:314)
GooglePlayServices.UnityCompat:GetAndroidTargetSDKVersion() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:121)
GooglePlayServices.PlayServicesResolver:CanEnableJetifierOrPromptUser(String) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:2314)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe(Action1, Boolean, Boolean, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1635) GooglePlayServices.<ScheduleResolve>c__AnonStorey1E:<>m__3F() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1604) GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1461) GooglePlayServices.PlayServicesResolver:ScheduleResolve(Boolean, Boolean, Action1, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1617)
GooglePlayServices.PlayServicesResolver:AutoResolve(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1134)
GooglePlayServices.PlayServicesResolver:m__47() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1113)
Google.RunOnMainThread:ExecutePollingJobs() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:300)
Google.RunOnMainThread:m__A() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:414)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

image

Warning Log2:
Unable to list target platforms. Please make sure the android sdk path is correct.

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

UnityEditor.Android.CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct.
D:/Unity/Hub/Editor/2019.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK\tools\bin\avdmanager.bat list target -c

stderr[

]
stdout[

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
]
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 /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:263)
GooglePlayServices.UnityCompat:GetAndroidTargetSDKVersion() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:121)
GooglePlayServices.PlayServicesResolver:CanEnableJetifierOrPromptUser(String) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:2314)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe(Action1, Boolean, Boolean, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1635) GooglePlayServices.<ScheduleResolve>c__AnonStorey1E:<>m__3F() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1604) GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1461) GooglePlayServices.PlayServicesResolver:ScheduleResolve(Boolean, Boolean, Action1, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1617)
GooglePlayServices.PlayServicesResolver:AutoResolve(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1134)
GooglePlayServices.PlayServicesResolver:m__47() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1113)
Google.RunOnMainThread:ExecutePollingJobs() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:300)
Google.RunOnMainThread:m__A() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:414)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
image

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@jazib-shahzad
Copy link
Author

This issue does not seem to follow the issue template. Make sure you provide all the required information.

Updated

@Thaina
Copy link

Thaina commented Feb 18, 2020

I think this is not because android resolver but because unity preference

You might need to toggle java and android sdk path in unity preference

@paulinon
Copy link
Collaborator

Hi @jazib-shahzad. Are you using the most recent version of the resolver? If not, please try updating it and see if you're still facing the issue. As mentioned here, this type of issue has been resolved in version 1.2.125.

@paulinon paulinon added the needs-info Need information for the developer label Feb 18, 2020
@sp-jordi-vilalta
Copy link

We also faced some issues with the reported JDK/SDK/NDK paths in Unity 2019.3. Fortunately, this version introduces AndroidExternalToolsSettings and from our experience these seem to be reliable. I recommend using these when available.

@google-oss-bot
Copy link

Hey @jazib-shahzad. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot google-oss-bot added the stale Don't have recent activity label Mar 3, 2020
@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@jazib-shahzad if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@google-oss-bot
Copy link

Hey @jazib-shahzad. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot google-oss-bot added the stale Don't have recent activity label Mar 13, 2020
@stewartmiles stewartmiles added type: feature request and removed needs-info Need information for the developer stale Don't have recent activity labels Mar 13, 2020
@stewartmiles
Copy link
Contributor

Ignore @google-oss-bot , the patch is merged internally and should land in a release next week.

@ahmedaniss25
Copy link

Problem fixed here : https://youtu.be/8rpKy1rBDlA

@Apoll0
Copy link

Apoll0 commented Dec 21, 2021

Upgrading EDM2U to 168 fixed for me

@paulinon
Copy link
Collaborator

Hi @jazib-shahzad,

Version 1.2.136 has been released which fixed the path discovery issue in Unity 2019.3.1. With that, I'll be closing this ticket for now.

@googlesamples googlesamples locked and limited conversation to collaborators Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants