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 I got JDK with Unity Hub but Android export says I didnt

Discussion in '2D' started by cyclSunity, Oct 3, 2020.

  1. cyclSunity

    cyclSunity

    Joined:
    Jun 10, 2020
    Posts:
    123
    Hey, exporting a game for a friend. This is what pops up when I press "Build" for Android:
    Screenshot (31).png
    I got JDK with Unity Hub already though! Help!
     
  2. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    go to preferences> external tools and set the path
     
  3. cyclSunity

    cyclSunity

    Joined:
    Jun 10, 2020
    Posts:
    123
    It is set already, but it says "You are missing the recommended JDK. Install the latest version using Unity Hub."
     
  4. cyclSunity

    cyclSunity

    Joined:
    Jun 10, 2020
    Posts:
    123
    Here is a screenshot of the folder
    C:\Users\Bosto\Desktop\Unity Versions\2020.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
    :
    Screenshot (32).png
    And btw Desktop is a folder not the actual desktop
     
  5. JorgenAkesson

    JorgenAkesson

    Joined:
    Oct 5, 2020
    Posts:
    1
    Hi!
    I also have problem with JDK. I have installed Java version 1.8.0_0261 but Unity still says that I cant use version other then 1.8.0 because it is not official supported.
    How do I solve this?
     
  6. cyclSunity

    cyclSunity

    Joined:
    Jun 10, 2020
    Posts:
    123
    I've installed 3 different versions of Unity and Android Export doesn't work on any. :(
     
  7. Lord_Eniac

    Lord_Eniac

    Joined:
    Jan 28, 2020
    Posts:
    48
    If it's any consolation, Unity Hub has NEVER installed, nor given me the ability or option to install or download, the supported versions of the Android SDK, NDK, or JDK. I've installed (and re-installed in the off-chance I missed something) various versions (2019.3.3f1 and 2018.4.26 were the last two) and each time it installs without these tools. No options other than the include Android platform (wording escapes me). The only way I've managed to get Android set up is to do it manually (i.e. install Android Studio, the correct version of the NDK, and the JDK from Oracle.)

    Apparently this feat can be accomplished, but I've got no clue as to which stars and planets need to be aligned in order to do so.

    Edit: So, out of curiosity, I tried again with 2019.4.12f1. Lo and behold, there was an option to expand the Android section to reveal two additional checkboxes, both not selected, that allow you to download OpenJDK and the NDK. I have not seen the arrow to the left of Android, but clicking it revealed what I was missing. I guess the stars and planets were aligned correctly. :)

    Why these two items aren't checked by default, seeing as how we must have them, remains a mystery. There doesn't seem to be a way to access installation options from older releases in the hub, either. So, if you need to download these items, do it when you install the program the first time.
     
    Last edited: Oct 18, 2020
    raarc likes this.
  8. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    it only offers you to the 1 version that you can access through the hub

    also its not default because the sdks take a lot of space and if you arent developing for mobile its just a waste of space on your hard drive
     
  9. Lord_Eniac

    Lord_Eniac

    Joined:
    Jan 28, 2020
    Posts:
    48
    Why would you install the Android platform if you weren't developing for mobile? :confused: Basically, unless you know that the Android section is expandable, then you're basically wasting time installing something that is going to later complain that you didn't install everything (i.e. the two items in the expandable section). At the least, the Android section should auto-expand when you click it during the installation process.
     
    Last edited: Oct 18, 2020
  10. cyclSunity

    cyclSunity

    Joined:
    Jun 10, 2020
    Posts:
    123
    I would just uninstall and reinstall Unity 2020.1, but then I might lose all of the projects I created with 2020.1.