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


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 😉


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.


happens to me after updating VS 2019 to Version 16.11.5 two days ago, it happens before AND after I install ndk from Android SDK Manager, and Android NDK Location setting is NOT in VS Options->Xamarin->Android Setting, check this FAQ https://docs.microsoft.com/en-us/xamarin/android/troubleshooting/questions/android-sdk-location?tabs=windows