Developer7223
Developer7223

Reputation: 61

NDK not found at specified location

After installing Xamarin Studio I went to the options to make sure the Android SDK, JDK and NDK were all found. The first two in fact were, but the NDK was not found. It asked to specify location, and I did specify the location (when I clicked "browse" it took me to the folder where the NDK actually was). Yet, it still does not recognize it and says NDK not found at the specified location.

Upvotes: 5

Views: 12653

Answers (6)

Kris
Kris

Reputation: 9

my advice is to download NDK that is coherent to your version of Visual Studio, for instance, if you have VS 2015 download NDK of 2015 or 2016 year, it really helped, cause there wasn't that EXE file in NDK of 2019 version, but it was in the NDK of 2016

Upvotes: 0

user6695808
user6695808

Reputation:

Open ndk-stack.cmd with notepad to see full path of ndk-stack.exe

You can find this file in "installation-path\android-ndk\prebuilt\windows\bin\ndk-stack.exe"

Upvotes: 0

vb10
vb10

Reputation: 681

Change android min sdk version 4.2 or higher (API LEVEL 17+)

Upvotes: -1

YasharF
YasharF

Reputation: 642

When using Xamarin Studio, if you are getting the error XA5101 error ("Missing Android NDK toolchains directory") you would need to download the Android NDK separately from:

http://developer.android.com/tools/sdk/ndk/index.html

Then he should unzip downloaded file and open the Xamarin IDE and go to the following menu location:

Tools ==> Options ==> SDK Locations ==> Android

Select the location of the unzipped folder.

Then close the IDE and reopen it (force close/restart if it persists in task/process manager).

Alternate to try:

Not finding NDK may also be caused because of mismatched configuration for AVD Manager. More specifically, the Xamarin may be creating devices & AVDs in your %USERPROFILE%.android while the debugger/runtime emulation EXPECTS the AVDs in the ADT directory. You can try copying ZAVD2-related files and directories into the %USERPROFILE%.android\avd and see if that resolves the issue.

===== Initial post ======

[In case of eclipse] I think the answer is here: https://stackoverflow.com/a/11825963/918535

//goto Preference → Android → NDK and choose your ndk location

//If your NDK location is already set, the builder in the toolchain editor may be wrong. Go to project properties, C/C++ Build | Tool Chain Editor and select Android Builder as current builder.

// in your .bashsrc file, you may also need to add the env variable:

NDK_HOME=/opt/android-ndk-r8
export NDK_HOME

Upvotes: 3

David Clarke
David Clarke

Reputation: 13256

In case this catches anyone else out, I had this issue but it was because I checked "Enable AOT (Experimental)" in the Android Build Code Generation settings. This setting is off by default so probably should have left well enough alone.

Upvotes: 1

Developer7223
Developer7223

Reputation: 61

Okay, so I found the issue. There was no ndk-stack.exe file in my NDK location. I was thinking I would delete/uninstall everything related to NDK and reinstall. This is when I came upon ndk-build.cmd, just thought id click it since it was a cmd, and it created the ndk-stack.exe at a location on my computer which was found by both the Xamarin studio and Visual Studio( noticed later that even VS couldnt find the NDK but after the cmd, it did). Thank you for the help.

Upvotes: 1

Related Questions