Open itssmutnuri opened 5 years ago
Configuring the JDK/SDK path manually.
One workaround I found is to uncheck JDK/SDK installed with Unity, click on both browse button so that the path filled automatically and then re-check the checkbox.
Thank you, @miner46er . That works.
But shouldn't it happen automatically?
On digging around a bit, I found that both the JDK path and Android SDK path are being set via Unity's EditorPrefs:
JDK Path:
CloudAnchorPreprocessBuild.cs
script (line 52):
var jdkPath = UnityEditor.EditorPrefs.GetString("JdkPath");
SDK Path:
ShellHelper.cs
script (line 84):
sdkRoot = EditorPrefs.GetString("AndroidSdkRoot");
If I'm guessing right, these are not being correctly referred to. I'm not sure if anything has changed from Unity's end.
You're welcome, @itssmutnuri.
Yeah, I found that too. Apparently when you tick "JDK/SDK installed with Unity" checkboxes, Unity doesn't automatically set the proper value to JdkPath
and AndroidSdkRoot
.
@xiaomaogy
Why did I get @ here @victor871129 ?
SPECIFIC ISSUE ENCOUNTERED
Below error pops up when I "play" a scene with ARCore (HelloAR, in this case), and the console errors (also shown below) when I build it. Checked with a simple Android build, without the ARCore SDK, the error doesn't occur.
Error:
A JDK path needs to be specified for the Android Build
The JDK has been installed using the Unity installer, which is the recommended method:
**
For some reason, ARCore is unable to detect the JDK on its own, when it has been installed via Unity
I'm not sure what I'm missing here. Does ARCore SDK not support the JDK with Unity?
Edit: Given the same settings as before, I am also encountering the below issue, thrown by Instant Preview. The Android SDK is not being detected.
VERSIONS USED
STEPS TO REPRODUCE THE ISSUE
WORKAROUNDS (IF ANY)
Configuring the JDK/SDK path manually.