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.
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!
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
I just stumbled upon this same issue after upgrading to 2019.2.3f1 on the Mac. My package revision # in the source.properties says “16.1.4479499” from the Unity3D hub.
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…
(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
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.
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.
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 Unity - Manual: Android environment setup (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.
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
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!
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.
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
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.