Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

How to go about Android JDK and SDK

Discussion in 'General Discussion' started by dyach3579, Jun 15, 2020.

  1. dyach3579

    dyach3579

    Joined:
    Jan 3, 2018
    Posts:
    22
    Hi, I've been trying to build my game to Android, and at one time I was getting errors about not having JDK or SDK. After i restarted Unity I don't see the errors at the moment, but in the External Tools I see its saying that Im missing the recommended JDK and SDK tools, etc.

    I tried downloading the JDK from the Oracle website for my Mac, and then went to Android Studio but I learned on some instructional videos that alot of people aren't installing Android Studio. Instead they go to the "Command Line Tools" and download the SDK from there, which is on the Android Studio site.

    I tried both of these things but I can't seem to get things working, and the External Tools in Unity is still giving me the missing JDK and SDK. On the instructional videos there's always a "Browse" option in their External Tools for the SDK, etc. But I don't have that. I posted a picture here from my external tools and was hoping someone can tell me why I don't have a Browse option and why its telling me this?

    It says to install it from the Hub but I can't do that neither because you'll see in my picture here that I don't have the "Add Modules" option. Is there an easy way to install Android JDK and SDK from the Hub, or do I need to install it from an external webpage.....like i already tried to do? Any help is appreciated.

    Here are the pictures. The external tools saying Im missing the JDK, etc and what my unity hub looks like. Thank you for any help.
     

    Attached Files:

  2. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    When you install Unity from the hub, there are sub options under Android build support, to install the JDK and SDK, make sure you check those boxes.
     
  3. dyach3579

    dyach3579

    Joined:
    Jan 3, 2018
    Posts:
    22
    Yes I know that now. It’s already installed though so not sure what to do about that as far as Unity hub goes. Won’t let me choose those options.
     
  4. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    Do you need all those versions of Unity installed?

    Might be worth removing all existing versions in Unity Hub, then installing a new version of Unity, making sure to choose JDK and NDK under Android build support options.

    Once all versions of Unity uninstalled, make sure there are no other installers for JDK or NDK on your computer, if so uninstall those.

    Then go to those JDK/NDK folders, and delete them manually.

    Then install Unity editor, with JDK/NDK support.
     
  5. dyach3579

    dyach3579

    Joined:
    Jan 3, 2018
    Posts:
    22
    Okay. I don’t need all of them. I’ll try your suggestion. I now installed Android Studio on my Mac, but if I’m understanding you correctly I need to delete that. I’ll try that and then install some newer versions of unity. Thank you for your help