Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XA5104 Could not locate the Android NDK

XA5104: Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.

The NDK location is set to the ndk within the android sdk but still this shows up

like image 221
Nada Avatar asked Oct 05 '21 18:10

Nada


Video Answer


2 Answers

All the answers above are valid.

But in case you can't change the default location of the Android NDK through the settings (it was my case, I think it's a Windows 11 problem as surprising as it may sound):

  • Make sure you installed NDK, if not: Tools > Android > Android SDK manager > Tools > select NDK > Apply Changes

  • Create a folder named "AndroidNDK64" in C:\ProgramData\Microsoft

  • Move the C:\Microsoft\AndroidNDK\android-ndk-... folder to the folder you just created

It worked for me and I hope it works for you too 😉

like image 95
Bryce Friha Avatar answered Sep 20 '22 03:09

Bryce Friha


I came across this issue and it turned out to have nothing to do with the Android NDK. I was trying to deploy a debug version of my app on top of a release build, changing back to debug or uninstalling my app solved the problem.

like image 21
Muhammad Khan Avatar answered Sep 24 '22 03:09

Muhammad Khan