Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Unity Hub does not install correct version of Android NDK

Discussion in '2022.2 Beta' started by Kichang-Kim, May 19, 2022.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,003
    Hi. I found that Unity Hub 3.1.2 + Unity 2022.2.0a13 cannot build Android client due to missing Android NDK error. Re-installing Unity and Android module does not work.

    You can see warning message like this in Preference window:
    You are missing the recommended Android NDK. Install the recommended version using Unity Hub.



    I tested on Mac Pro 2019 with macOS Monterey 12.3.1.
     
    Deleted User likes this.
  2. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    Hi! We've upgraded the NDK used in Unity 2022.2 to r23b, but the Hub was not updated yet to reflect the new dependency. Apologies for the inconvenience.

    While the Hub people are working on the stuff, could you instead install the NDK manually from https://developer.android.com/ndk/downloads and configure the path in Preferences window?
     
    Kichang-Kim likes this.
  3. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,003
    @Yury-Habets Hi. It there any news for this? (or public issue tracker link?)
     
  4. Deleted User

    Deleted User

    Guest

    Plz can u provide the link to the supported NDK version for b13?? The link u has another version which isn't supported by b13
     
  5. Cery_

    Cery_

    Joined:
    Aug 17, 2012
    Posts:
    48
  6. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,003
    @Yury-Habets
    I don't know it is related to this issue, but I found that Unity Hub 3.2.0 always failed to install Android commandline tools module when installing Unity 2022.1.8f1 on Windows.
     
  7. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
  8. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,132
    It's very weird that we required hub to download android SDK and NDK and other dependency. Yet they will be loaded into separated unity folder even though difference version of unity might be shared the same version of some dependencies

    While unity editor try to fixed itself to specific version of dependencies yet it cannot download its own dependencies. But it relegate the hub to manage its version. Without any benefit to anyone

    To be honest, the design of this flow is totally mismatch. It should be opposite. The editor should be able to force hub to download dependencies for them in any version and the hub should be always obediently download it. But hub should centralizing the version of them to be shared so it don't need to download duplicate version which is a waste of space and time
     
    Last edited: Jul 14, 2022
    neonblitzer likes this.
  9. VivekSunity

    VivekSunity

    Joined:
    Dec 16, 2018
    Posts:
    4
    Hi,
    I just installed Unity 2021.3.9f1. I am facing issues building app bundle. Get following error when I take Option Update Android SDK:

    SDK version 28.0.3 < 29.0.2 If I say update Android SDK it gives following message: UnauthorizedAccessException: Access to the path 'C:\Program Files\Unity\Hub\Editor\2021.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tempToolsDir' is denied.

    I checked there is no directory by the name tempToolsDir

    When I take the option Use Highest Installed I get the following error:
    Android NDK not found or invalid, fix it in Edit/Unity --> Preferences --> External Tools

    I installed SDK/NDK etc with Unity Hub only.

    Please help.
     
  10. fortunacio

    fortunacio

    Joined:
    Aug 30, 2014
    Posts:
    6
    For anyone still facing this issue in 2024, I fixed it by installing the Android module in steps from Unity HUB:
    1- Install the editor alone.
    2- Install the Android module, but JUST THE sdk&ndk (avoid the Java installation).
    3- Install Java.
    4- Install the other modules you need. (win, mac, ios, etc.).

    Cheers.