5

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.

William Barbosa
  • 4,936
  • 2
  • 19
  • 37
Developer7223
  • 61
  • 1
  • 1
  • 4

6 Answers6

3

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
Community
  • 1
  • 1
YasharF
  • 633
  • 5
  • 10
1

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.

Developer7223
  • 61
  • 1
  • 1
  • 4
1

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.

David Clarke
  • 12,888
  • 9
  • 86
  • 116
0

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"

0

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

Chandresh Khambhayata
  • 1,748
  • 2
  • 31
  • 60
Kris
  • 9
  • 1
-1

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

vb10
  • 641
  • 5
  • 14