Why Unity3d can not find Java for Android SDK

22,518

Solution 1

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

Solution 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

Share:
22,518
Yogurt The Wise
Author by

Yogurt The Wise

Updated on June 07, 2020

Comments

  • Yogurt The Wise
    Yogurt The Wise almost 4 years

    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?