Why Unity3d can not find Java for Android SDK
Asked Answered
S

3

7

For days now I;ve been getting the error below with

  • Unity 3d v4.3.2f1
  • jdk1.8.0_11
  • Android SDK v0.8

Error building Player: UnityException: Unable to find suitable jdk installation. Please make sure you have a suitable jdk installation. Android development requires at least JDK 6 (1.6). The latest JDK can be obtained from the Oracle http://www.oracle.com/technetwork/java/javase/downloads/index.html

I have been to just about every site trying all types of ideas to get this to work. Someone out there must have an idea how to properly fix this.

I have messed with the environmental vars (PATH, JAVA_HOME, JDK_HOME) Reinstalled Android SDK. Fooled with the Fond_Java.bat in android tools folder. Reinstalled JDK/JRE 32bit and 64 bit, removed 64bit(twice)

Android SDK opens perfectly find when the Path vars are set correctly. But for some reason Unity will not build the Android player.

Is it because I'm using the Android Beta SDK instead of the Eclipse ADT with ANDROID SDK?

Sexology answered 24/7, 2014 at 23:47 Comment(0)
N
2

Set up JAVA_HOME variable. The example is here: http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html

Nona answered 10/12, 2014 at 19:55 Comment(0)
T
2

In Unity, Edit > Preferences > External Tools`:
Scroll to the bottom, you'll see the Android settings part, then you can browse the location of your JDK path.

enter image description here

Tidewaiter answered 7/6, 2018 at 4:4 Comment(0)
W
0

try to install x86 JDK.
i have windows 8.1 x64 and i also had same problem. i tryed all variants with PATH, reinstalling and etc, in the end I decided to try install x86 jdk in my x64 windows, and after this unity build success my apk.

Worsham answered 13/8, 2014 at 19:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.