Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Resolved Android NDK missing

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

  1. Deleted User

    Deleted User

    Guest

    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 by a moderator: Jun 14, 2019
  2. Nachip

    Nachip

    Joined:
    Aug 15, 2016
    Posts:
    2
    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
     
    Harry_Drew and CrandellWS like this.
  3. Deleted User

    Deleted User

    Guest

    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:
    178
  5. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    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?
     
    aineshsc likes this.
  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:
    802
    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)
     
  8. Deleted User

    Deleted User

    Guest

    Thank you @fherbst for your help :D I updated the post.
     
    honor0102 likes this.
  9. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Thank you fherbst. Legend! Worked for me. Just changed 'windows' to 'linux' in filename.
     
    honor0102 likes this.
  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:
    31
    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:
    31
    I used this one:
    Did you set the new NDK location in Unity?
     
  15. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    ROBYER1 likes this.
  16. thejox

    thejox

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

    DeliaF_Manea

    Unity Technologies

    Joined:
    Jul 9, 2019
    Posts:
    25
    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:
    77
    @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:
    25

    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:
    77

    Attached Files:

  21. DeliaF_Manea

    DeliaF_Manea

    Unity Technologies

    Joined:
    Jul 9, 2019
    Posts:
    25
    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:
    78
    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!
     
    Deleted User likes this.
  23. sandeepsmartest

    sandeepsmartest

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

    sandeepsmartest

    Joined:
    Nov 7, 2012
    Posts:
    139
    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
     
    anuragaofl and JairoGLoz like this.
  25. ddsinteractive

    ddsinteractive

    Joined:
    May 1, 2013
    Posts:
    28
  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:
    13
    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:
    168
    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:
    37
    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

    Joined:
    Feb 15, 2018
    Posts:
    111
    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
     
    unity-slash likes this.
  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
     
    ShruthiB likes this.
  32. CPlusSharp22

    CPlusSharp22

    Joined:
    Dec 1, 2012
    Posts:
    111
    thank you - this fixed it for me too.
    Needed to move the files out of {NDKVERSION} folder and into NDK
     
    phobos2077 likes this.
  33. Litovets

    Litovets

    Joined:
    Sep 3, 2012
    Posts:
    24
    Hi there. I have the same issue on Unity 2019.3.0f1, installed using Hub with Android support and SDK/NDK Tools. I was trying to select installed NDK manually but Unity tells that it require 19.0.5232133 that is exactly the same as installed with Hub. Is it bug or I missed something? Thanks!
     
  34. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Could be this issue: https://forum.unity.com/threads/case-1201831-failed-to-build-android-build.785294/
     
  35. UnrealTati

    UnrealTati

    Joined:
    Aug 18, 2017
    Posts:
    5
    Really Unity doesn't even know where their hub installed the NDK lol. This is correct solution. Do not downgrade or try to tick off x64. Google now requires x64.
     
    phobos2077 likes this.
  36. Dazo1985

    Dazo1985

    Joined:
    Mar 13, 2019
    Posts:
    26
    Same issue
    The ndk content was located in a sub directory below NDK\ -> android-ndk-r19, not as in the previous Unity versions.
    Giving unity the new path did not work:
    C:\Program Files\Unity\Hub\Editor\2019.3.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r19

    It was definitly there but showed as missing.

    Solution:
    Had to move the content of \android-ndk-r19 into
    \NDK

    and it worked.
     
  37. Litovets

    Litovets

    Joined:
    Sep 3, 2012
    Posts:
    24
    It works, thank you!
     
  38. Hypertectonic

    Hypertectonic

    Joined:
    Dec 16, 2016
    Posts:
    75
    This did the trick. Thanks
     
    Pranay1Knight likes this.
  39. homanicsjake

    homanicsjake

    Joined:
    Feb 18, 2019
    Posts:
    15
    YES THIS WORKED. This is crazy that that is a solution to the problem. Are any Unity devs aware of this? i spent the past three hours scratching my head and scouring the internet.
     
    Pranay1Knight and Sergionexx like this.
  40. Tabu

    Tabu

    Joined:
    Dec 3, 2008
    Posts:
    44
    YES This fix works for 2019.2.15f1 Thanks man
     
    skoteskote and marcowiprojects like this.
  41. mikapote

    mikapote

    Joined:
    Oct 24, 2018
    Posts:
    28
    Damn, how can this still happen? Had to use the trick described by Dazo with 2019.3.0f3, it works.
     
  42. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
  43. homanicsjake

    homanicsjake

    Joined:
    Feb 18, 2019
    Posts:
    15
    @LeonhardP Awesome and Thank you! The fix will be VERY much appreciated.
     
    LeonhardP likes this.
  44. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Update: the fix will already be published sooner as part of the minor 2.2.2 update. The intent is to release that later today.
     
    Hypertectonic, ROBYER1 and juissi like this.
  45. artgatevr

    artgatevr

    Joined:
    Sep 27, 2018
    Posts:
    1
    I had this issue, after trying everything I ended up just running sdkmanager.bat file and it worked!
     
  46. Mahaybee

    Mahaybee

    Joined:
    Dec 4, 2019
    Posts:
    1
    Amazing ! Thank you.
     
  47. Thriving

    Thriving

    Joined:
    Jun 28, 2017
    Posts:
    5
    Any update on 2.2.2?
     
  48. FcsVorfeed

    FcsVorfeed

    Joined:
    Aug 15, 2014
    Posts:
    50
    of course not, Don't you know there's a serious problem inside HUB's team?
     
    swayams and IgorAherne like this.
  49. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,620
    Nope, please tell me about it.
     
    swayams likes this.
  50. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Just had this issue on the 2.2.2, will it actually be fixed in 2.3.0?
     
    alexchesser and sama-van like this.