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. Dismiss Notice

Question JDK, Android NDK and SDK download

Discussion in 'Android' started by JodieH, Dec 9, 2022.

  1. JodieH

    JodieH

    Joined:
    Sep 9, 2022
    Posts:
    18
    Hello,

    I have to find and install the JDK and Androids SDK and NDK separately from Unity as I have had issues installing editors via the Hub and my Editor installs do not have the modify option.

    I went to the Android website and downloaded the SDK and NDK command-tools, but Unity couldn't find the file it needed. The JDK I installed from OpenJDK was the latest release, but Unity said it was the wrong one.

    Could someone please send me a link, or tell me what it is I need to download to get these installed so I can build for Android?

    Thank you :)
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
  3. JodieH

    JodieH

    Joined:
    Sep 9, 2022
    Posts:
    18
    Hello,

    Thank you for your reply.
    Unfortunately I'm still not managing to find the files that I need to download. I've tried several JDK downloads from their website and I've installed the NDK(SidebySide) component on the Android Studio app (the only available NDK), but so far the only thing I've successfully installed in the SDK.

    Any chance you could send me the links to the specific things I need to download please?
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    It depends on unity version you're targeting
     
  5. JodieH

    JodieH

    Joined:
    Sep 9, 2022
    Posts:
    18
    I have 2021.3.15f1
     
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
  7. JodieH

    JodieH

    Joined:
    Sep 9, 2022
    Posts:
    18
    You are a life saver! Thank you so much!
     
  8. stormnara48

    stormnara48

    Joined:
    Dec 10, 2022
    Posts:
    1
    Hello, how did you manage to install all of the files above? It's been a week and I gave up but I randomly found that We had the exact same issue so this probably could solve mine
     
  9. JodieH

    JodieH

    Joined:
    Sep 9, 2022
    Posts:
    18
    Hello!
    The SDK I got from downloading the Android Studio app, the SDK seemed to come with it: https://developer.android.com/studio (didn't need to use it, just installing it worked)
    The NDK I used the link Tomas sent: https://dl.google.com/android/repository/android-ndk-r21d-windows-x86_64.zip
    and the JDK link https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html will give you a list for each PC type, you'll need to create an Oracle account to download it.

    But that all worked for me! I unzipped the folders into my C drive where the Hub is, just to keep them together. Unity found the SDK automatically but I had to choose the root folder of the JDK and NDK for it to find them.

    I hope it helps! :)
     
  10. GameDeveloperAf

    GameDeveloperAf

    Joined:
    Jul 3, 2020
    Posts:
    71
    My unity version is "2022.1.20f1" and what is the sdk ndk and jdk version. And how do I know what version Unity support sdk jdk and ndk versions?
     
  11. GeceSesi

    GeceSesi

    Joined:
    Jan 10, 2019
    Posts:
    3
    Hello. I think this is what you are looking for. Go to the site and scroll down a bit.
    You can find NDK/JDK versions here - https://docs.unity3d.com/2023.1/Documentation/Manual/android-sdksetup.html
     
  12. Saeed-Barari

    Saeed-Barari

    Joined:
    Jul 12, 2021
    Posts:
    47
    hey, may I ask how you managed to get the direct links? was it from the modules.json file from UnityHub-installed versions ?
    + about the modules.json, a direct file like this one would be so much appreciated! can you pass this on to the Unity team please?
     
    Last edited: Apr 4, 2023
  13. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    You can locate these paths in HUB logs when you're trying to install Unity
     
    Saeed-Barari likes this.
  14. HippyJesus

    HippyJesus

    Joined:
    Dec 2, 2020
    Posts:
    8
    @Tomas1856 Can we please get a more discoverable public download link for these android components? Preferably a torrent that can be linked with the editor torrent from the download archives? Ideally, there should just be a link to the download sites in the editor that can grab the associated files if they aren't detected.

    I consistently have an absolute hell of a time trying to get Unity HUB to properly install any of it. This past weekend was spent between constant download failures and then having HUB get stuck after the editor install, which ended up forcing me to quit after 2-3 HOURS of letting my CPU sit at close to 100% while the HUB tried to act like it was finishing the editor install even though all files were installed and the editor installer was finished and long since gone from task manager. I finally had to force quit HUB, which then bailed on the rest of the components and made me manually find and install them from the %USER%/AppData/Local/Temp folders. Of course then I had to figure out exactly where each of the zips went and even then it was missing cmdline-tools and build-tools, which I had to copy over from android studio before I finally got an android apk built. To say that process was infuriating would be putting it mildly.

    The little gear widget to install components has never ever worked for me. All I ever see is Remove from Hub and Show in Explorer options. The only time I ever get a chance to add components to installs is if I happen to select them on initial download.

    All of these issues have plagued HUB on my system for years, which is why I now just download the torrents from the archives, but then you have to try and use android studio to link to the proper files and correct versions, which is always a whole other batch of fun. That's how I ended up trying HUB installs again over the weekend and losing most of my weekend to attempting to get an APK built.

    I did finally get it built, but I never want to touch any part of that whole chain now. I will just attempt to stick with this version and pipeline until 2023+ lands and I have to move to a new LTS.
     
    Last edited: Apr 4, 2023
    protopop likes this.
  15. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Sorry to hear that.

    Could you submit your feedback here - https://unity.com/roadmap/unity-hub

    "Submit a new idea
    Feature Request"


    The download and installation routines are handled solely by the HUB team, and they don't monitor this section of the forum.
     
    HippyJesus likes this.
  16. Saeed-Barari

    Saeed-Barari

    Joined:
    Jul 12, 2021
    Posts:
    47
    ah thanks I didn't know that. ( I noticed I'd forgot to set hyperlink to my previous comment, now I edited it and fixed it; it's pointing to a modules.json file from an open source project. the modules.json file ONLY exists in unity editors installed from hub, which I think doesn't make much sense to not include in manually installed ones)