Android NDK "ndk-build" is recognized as an internal or external command file

How to install android-ndk. I set the path for ndk, but when I execute the "ndk-build" command, I get an error. fya I am using the Windows operating system.

+8
android android-ndk
source share
7 answers

This worked for me:

  • Open command line and go to the project
c:\eclipse\workspace\myproject 
  1. Then I ran ndk-build script from androif ndk folder

c: \ eclipse \ workspace \ myproject> c: \ android-ndk-r8d \ ndk-build

+7
source share

Well, I ran into the same problem, I got a fix by adding the ndk path to the value of the path variable in the environment variable (system variable) that left my path variable like this

enter image description here

A dedicated path is the path to where I extracted my ndk. (A semi-colon indicates the end of the path).

Although I tried the option of adding NDK_HOME or ANDROID_NDK_HOME with the path to my ndk as a value that does not work, I think that these variables are intended for applications that use them, probably when getting system properties, variables or so on. But this will work with the command line

+5
source share

What error message do you get exactly?

You will probably need to go through the documentation ( http://developer.android.com/tools/sdk/ndk/index.html#Installing or docs / INSTALL.html from the NDK installation folder), but to get started, try answering these first simple basic questions:

  • Have you added the installation folder to the PATH environment variable?
  • Have you installed Cygwin (www.cygwin.org) on ​​your Windows system?

I hope that the answer to them can get what you need. If not, let me know.

+3
source share

After installing the android ndk, you must add its installation directory to the environement variables in the Path section Go to Control Panel \ System and Security \ System - advanced system settings - environement variables.

Then you can use either the cmd window or Cygwin to execute the command

NDK assembly

Before executing the command, you must go to the directory of what you want to build.

+1
source share

Set path only for system variables, not for the current user variable:

enter image description here

0
source share

Although I added the ndk root path to the path variable, ndk_build failed because there was a space at the end of the ndk root path. Removing extra spaces from the path worked.

0
source share

Good question!

I ran into the same problem and solved it.

  1. Add the ndk path to the system variable , for example, NDK_PATH, and restart the computer.

  2. Then you can run ndk-build.cmd with the system variable in cmd. Example:% NDK_PATH% \ ndk-build.cmd

  3. It works!!!

0
source share

All Articles