Search Unity

Question JDK SDK and NDK

Discussion in 'Unity Hub' started by MartianMan2024, Jan 28, 2021.

  1. MartianMan2024

    MartianMan2024

    Joined:
    Oct 13, 2020
    Posts:
    35
    So when i try to make a android build for my game i get a message saying JDK is invalid or missing when i go to the external tools in the preference menu the auto path is applications/unitt/playbackengines/androidplayer/openjdk(same for the sdk and ndk) the problem is only at the last part because there is no JDK, SDK, NDK files right in my android player. Are they supposed to be there? And if they are why aren't they?
     
  2. Slip_de_feu

    Slip_de_feu

    Joined:
    Jun 13, 2021
    Posts:
    8
    It works for me.

    If you are facing problems with Unity Hub about installing "Unity 2020.3.11f1 / Unity 2021.1.11f1 and android modules (SDK, NDK, OpenJDK)", here's my solution :

    1) Firstly, I would recommend to install "UnitySetup-Android-Support-for-Editor-2020.3.11f1.exe" to your Unity 2020.3.11f1's path or "UnitySetup-Android-Support-for-Editor-2021.1.11f1.exe" to your Unity 2021.1.11f1's path.
    You'll have a folder named "AndroidPlayer" in your path "{UNITY_PATH}\2020.3.11f1\Editor\Data\PlaybackEngines\" or "{UNITY_PATH}\2021.1.11f1\Editor\Data\PlaybackEngines\".

    2) In your "AndroidPlayer" folder, decompress these 3 7z files : "Android_NDK_19.0.5232133.7z", "OpenJDK_1.8.0_152.7z", "Android_SDK.7z"

    3) Run Unity 2020.3.11f1 / Unity 2021.1.11f1 and go to FILE > Build settings, click on "switch platform"

    4) You can now build your android apps in Unity 2020.3.11f1 / Unity 2021.1.11f1