Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

(SOLVED) Android NDK missing

Discussion in '2019.3 Beta' started by Azedune, Jun 3, 2019.

  1. Azedune

    Azedune

    Joined:
    Dec 27, 2015
    Posts:
    3
    Hi :D

    UPDATE 1 (04 June 2019) : @Nachip recommended me to install the previous version - Unity 2019.2.0b4, and I use It, It works perfectly.

    UPDATE 2 (14 June 2019) : @fherbst recommends to download NDK r19a (https://dl.google.com/android/repository/android-ndk-r19-windows-x86_64.zip). I did, then I extracted the file, replaced the content of the original one (copy it to be safe) by the new content and It works wonderfully.

    I installed - Unity 2019.3.0a4 Personal with Unity Hub 2.0.0.
    ISSUE : "You are missing the recommended Android NDK..." in "Preferences/External Tools/".

    What I did :
    1. Installed Android SDK & NDK Tools by the lastest Unity Hub (screenshot 1).
    2. Tried to "Build" and "Build & Run", not working (screenshot 2).
    3. Checked in "Preferences/External Tools/" (screenshot 3).
    4. I located manually with this path "C:\Program Files\Unity\Hub\Editor\2019.3.0a4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\", error window (screenshot 4).
    If someone can give me a way to solve this problem, It could be helpfull for the community.

    Ps : If I made a mistake in english, please forgive me, I am fr, I tried to my best to write correctly.

    Thank you for your help :D

    Screenshot 1 :
    2.PNG

    Screenshot 2 :
    1.PNG

    Screenshot 3 :
    0.PNG

    Screenshot 4 :
    3.PNG
     
    Last edited: Jun 14, 2019
  2. Nachip

    Nachip

    Joined:
    Aug 15, 2016
    Posts:
    1
    I get the same issue. i solve it by changing the unity version to 2019.2.0b4 then downloading the NDK using the unity HUB
     
    CrandellWS likes this.
  3. Azedune

    Azedune

    Joined:
    Dec 27, 2015
    Posts:
    3
    I installed the version 2019.2.0b4 of Unity, and It works like a charm.

    @Nachip Thank you :D
     
    CrandellWS likes this.
  4. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    90
  5. jooleanlogic

    jooleanlogic

    Joined:
    Mar 1, 2018
    Posts:
    332
    I just checked the download list for latest 0a5 and it's still set to download ndk-r16b. Can anyone who's installed this say whether 2019.3.0a5 has reverted to the r16b ndk or does it still want ndk19 once installed?
     
  6. TanmayTNT87

    TanmayTNT87

    Joined:
    Jun 3, 2019
    Posts:
    5
    So do i need to re download version Unity 2019.2.0b4 ?
     
  7. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    299
    For me it didn't work with the one in 2019.2.0b4/b5, as those are NDKr16 as well, but instead had to use r19(a).

    Here's the exact version Unity is asking for, for anyone with the same issue.

    upload_2019-6-11_15-9-55.png

    Note that the most recent NDK r19 download from Google also doesn't work as it is too new:
    upload_2019-6-11_15-12-45.png

    This one (NDK r19a) works:
    https://dl.google.com/android/repository/android-ndk-r19-windows-x86_64.zip
    (Unity still displays "You are not using the recommended Android NDK" when doing that but building works)
     
    altankosar and jooleanlogic like this.
  8. Azedune

    Azedune

    Joined:
    Dec 27, 2015
    Posts:
    3
    Thank you @fherbst for your help :D I updated the post.
     
  9. jooleanlogic

    jooleanlogic

    Joined:
    Mar 1, 2018
    Posts:
    332
    Thank you fherbst. Legend! Worked for me. Just changed 'windows' to 'linux' in filename.
     
  10. WingNova

    WingNova

    Joined:
    Aug 10, 2016
    Posts:
    7
    Thank you so much this helped me. Your the best!
     
    wavekeyboard likes this.
  11. WalkerStudio

    WalkerStudio

    Joined:
    Feb 27, 2014
    Posts:
    5
  12. galloper

    galloper

    Joined:
    Aug 5, 2017
    Posts:
    10
    Please be aware that Unity 2019.3.0a7 has the same issue as mentioned above - it still wants NDK r19 (64-bit) (19.0.5232133), latest r19 from Google won't work, older ones won't work, except for the one that's linked here..
    Do they read these forums?
     
  13. jfgalvez

    jfgalvez

    Joined:
    Jul 12, 2019
    Posts:
    1
    Why my Unity ver. 2019.3.0a8 still dont work even though I install the that linked here?? :(
     
    Last edited: Jul 12, 2019
  14. galloper

    galloper

    Joined:
    Aug 5, 2017
    Posts:
    10
    I used this one:
    Did you set the new NDK location in Unity?
     
  15. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,569
    ROBYER1 likes this.
  16. thejox

    thejox

    Joined:
    Sep 29, 2015
    Posts:
    2
  17. DeliaF_Manea

    DeliaF_Manea

    Unity Technologies

    Joined:
    Jul 9, 2019
    Posts:
    14
    Can you make sure that you uninstall it with all of the modules, update HUB’s version and reinstall Unity with the Android module? Then go to the install directory, find the NDK folder, open the source.properties file and verify that NDK’s version is 16. Let me know if you did this and the issue is still there.
     
  18. bilalakil

    bilalakil

    Joined:
    Jan 28, 2018
    Posts:
    9
    @DeliaF_Manea I've a fresh install (as fresh as possible, just reformatted the computer) and via Unity Hub installed 2019.2.0f1 with Android + NDK + OpenJDK. Here's what I see at
    /Volumes/Mac500GB/Applications/Unity/2019.2.0f1/PlaybackEngines/AndroidPlayer/NDK/android-ndk-r16b/source.properties
    :

    Code (CSharp):
    1. Pkg.Desc = Android NDK
    2. Pkg.Revision = 16.1.4479499
    When I try to build it stops at Android NDK not found.

    Attached image of preferences showing that it's using everything from the hub.
     

    Attached Files:

  19. DeliaF_Manea

    DeliaF_Manea

    Unity Technologies

    Joined:
    Jul 9, 2019
    Posts:
    14

    Could you attach an editor.log file/ picture of it where the failed building process could be seen?
     
  20. bilalakil

    bilalakil

    Joined:
    Jan 28, 2018
    Posts:
    9

    Attached Files:

  21. DeliaF_Manea

    DeliaF_Manea

    Unity Technologies

    Joined:
    Jul 9, 2019
    Posts:
    14
    Thank you for the pictures. We couldn't reproduce the issue so we would suggest trying to set NDK path manually instead of enabling the "Android NDK Installed with Unity" checkbox. In this way it is possible to get a clearer error message.

    If the error is still the same, "Android NDK not found", NDK download might got corrupt for you and re-downloading may be an option.
     
  22. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    75
    I did some digging cause i had the same problem. I made my own post here on the forums but no one replied. I didn't want to wait, been looking everywhere on both unity websites and other forums. And I found this thing.
    From what i understand. Unity requires a specific version. So my guess is using a r19 ndk on the 2019.1 will cause conflicts. I downloaded the r16b. put it in the Editor directory. And i got finder to pop up with the browse function. which didn't happen before. I selected the path of the r16b ndk. and started a build. and it worked. My guess is Unity Hub installs one of the latest versions of the ndk. and not the version that is compatible with your version. For people who still have these problems. try this!
     
  23. sandeepsmartest

    sandeepsmartest

    Joined:
    Nov 7, 2012
    Posts:
    100
    It is not working in Mac for unity version 2019.3.0a12.
     
  24. sandeepsmartest

    sandeepsmartest

    Joined:
    Nov 7, 2012
    Posts:
    100
    changing the file source.properties -Pkg.Revision to 19.0.5232133 worked.For the people who downloaded the NDK manually "source.properties" stays inside the downloaded ndk folder.Thank you devs
     
  25. ddsinteractive

    ddsinteractive

    Joined:
    May 1, 2013
    Posts:
    20
  26. RFredW_Exient

    RFredW_Exient

    Joined:
    Mar 29, 2017
    Posts:
    3
    I've not (yet) encountered the "Wrong version installed" thing, but something that keeps tripping me up when upgrading unity is that the hub installs the NDK to...

    /Applications/Unity/Hub/Editor/(version)/PlaybackEngines/AndroidPlayer/NDK/(NDKVersion)/


    (on mac) but Unity, when building, expects to find it at...

    /Applications/Unity/Hub/Editor/(version)/PlaybackEngines/AndroidPlayer/NDK/


    (ie, not in a versionned subfolder) - While the external tools' "Android NDK installed with Unity" preferences window is happy that it's there, attempting an IL2CPP build without moving things up a level results in the "Android NDK not found" error.
    ttfn
    Fred
     
  27. rburns50

    rburns50

    Joined:
    Apr 16, 2016
    Posts:
    11
    Brilliant - the above had stumped me as I had checked changed to IL2CPP (from mono) and kept getting a NDK not found error! Thank you :)
     
  28. Max_Bol

    Max_Bol

    Joined:
    May 12, 2014
    Posts:
    117
    For those who are unable to use Unity HUB properly, we're basically caged out of using Unity at all for making any game on mobile devices especially because we can't use the HUB to get the right version of the NDK.

    The worst of it is that they know that the Unity HUB is a piece of unstable software that need quite a fix because, right now, people who have slow bandwidth or work on a relatively fluctuating network (for example, on an older router with less refresh rate as well as maybe 1 package lost once every 30-40 secs), the download constantly fails. In my case, on a previous version of the HUB, I was able to get to around 50% of the download done before it fails (which then force you to restart from scratch every time as the download gets cleared up in case of failure). Now, I reaches about 1% before it instantly fails with the latest Unity HUB version.

    In other words, because Unity HUB fails as a download manager for some of us, I, like others, am forced to use the Installer instead which works perfectly fine to download that multiple GB of filess, but the NDK is missing from the Android package downloaded with said Installer. Hence, we're in this vicious circle of hell that tells us "Use the Unity HUB" and the Unity HUB telling us "No can do. Try something else".

    To be honest, this wasn't happening when i was using Unity 2018.X and only started to happens with Unity 2019.2. I can only build the Android Apk with mono right now, which seems to broke my game by forcefully removing some key codes out of the game that result in button missing parts of their codes. I can't build using il2cpp backend because it now requires a NDK that is not coming with Unity anymore.

    I have been trying to find a solution for the past few days and I'll be missing the GDWC 2019 because of this.
    Thanks Unity for your lack of understanding.
     
  29. SpiralConDave

    SpiralConDave

    Joined:
    Dec 29, 2014
    Posts:
    35
    Same issue here. As I have several projects (different teams) I have several Unity installs. The Hub shows that some of them have add ons. Others do not, and hub will NOT add them. Is there a config file? Should I make symlinks to the NDK and SDK folders? Seriously, how hard is this to fix, it's been going on a long time. And, insult to injury, many updates to Hub, none of them fixes this.
     
  30. DanielTG

    DanielTG

    Unity Technologies

    Joined:
    Feb 15, 2018
    Posts:
    91
    Hi @Max_Bol and @SpiralConDave,

    As you have experienced, the Hub can only manage the components/add-on for versions of Unity downloaded/install directly from the Hub. There is unfortunately no easy solution or config to override this behaviour. We acknowledge the current limitations and UX behaviour and is something we plan to address in the future. In the case where you need to manually manage the SDK/NDK/JDK please follow the following documentation https://docs.unity3d.com/Manual/android-sdksetup.html (Using an alternate Java Development Kit, Android SDK, or NDK)


    Likewise, improving the Hub download stability and robustness for the Editors is another key target in our backlog for a future release. In these cases, if the downloads fails, it would be appreciated if you can submit a defect using the Hub bug reporter so the team can trace this issue in the log files.

    Thank you for your understanding,
    Daniel
     
  31. developersohaib0011

    developersohaib0011

    Joined:
    Mar 29, 2019
    Posts:
    2
    during build android project in unity 2019 and other new version >>Go to build setting>> then go to Other setting>> then scroll down || then see configuration >> in configuration go to >> scripting backend select > mono rather then IL2CPP then select ARMV7 rather then ARM64 your problem definitely will be solved thank