MysticPing
MysticPing

Reputation: 183

NDK-BUILD Not recognized as a command (Windows)

I know there is lot's of this question already however half of the just redirect to other questions and the others either tell me to stuff i tried, none of which worked.

The problem is i have been following this Tutorial. And the last step tell's me to use the ndk-build command, however when i try to run it i get this

'ndk-build' is not recognized as an internal or external command,

operable program or batch file.

I know i have the environmental path thing set right, and i did install cygwin and i did add it manually to the android program. So i do not know what the issue is. Any help would be much appreciated!

Upvotes: 4

Views: 10383

Answers (3)

amadib
amadib

Reputation: 898

I solved this issue by setting my NDK_HOME environmental variable and updating my path.

The $NDK_HOME on OSX or Linux (or %NDK_HOME% on Windows) points to the Android NDK Home Directory.

Then updating the PATH variable to include that directory and appending /build to the end of the path which solved the issue.

Upvotes: 1

Anshul Vyas
Anshul Vyas

Reputation: 317

I also tried adding my ndk path to the System environment variables but the error was still there.

It worked for me by:

Opening command prompt and navigating to project c:\eclipse\workspace\myproject

I then executed the ndk-build script from the android ndk folder

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

Upvotes: 3

18446744073709551615
18446744073709551615

Reputation: 16842

Not sure about cygwin (it sometimes makes windows-user-friendly exceptions), but on a real linux there are at least 3 gotchas:

1) the current directory is not searched for executables (at least by default)

2) You have to set the execute permissions on the files you want to execute, chmod a+x filename sets that permission, ls -l filename shows the permissions.

3) The disk may be mounted so that execution is not allowed.

4) file names are case-sensitive

which exefilename shows the full path of a command -- that is, if the system recognizes exefilename as executable.

Does it work if you provide the full path?

Does it work is you use source /full/path/to/ndk-build ?

Upvotes: 0

Related Questions