2016年10月29日 星期六

Cannot find Android NDK Visual Studio (Xamarin)

When you create a mobile project in Visual Studio, you might got he warning message below:

Xamarin.Android for Visual Studio requires Android NDK, which is used to embed .NET assemblies into native libraries. While the NDK is generally not used for developing an Android application, we suggest you to install it. Please set Android NDK path on Tools->Options->Xamarin->Android Settings menu.



To resolve the warning..

Double click the Warning message

The required path is not the root path of the installed NDK, and it should contain the file ndk-stack.exe

If the root path is used, the following error will be shown.

Cannot find ndk-stack.exe in specified NDK path:
ndk-stack.exe

The correct location should be the following

<Your NDK installated location>\ndk-bundle\prebuilt\windows-x86_64\bin

If you installed the ndk via Android Studio, you can find it from the SDK folder.

If you do not have the Android Studio, you can download it from the official website:

https://developer.android.com/ndk/downloads/index.html