简体   繁体   中英

Set Build path in Eclipse for ndk program

This error was shown when I build a android application program in Eclipse:

14:43:33 **** Incremental Build of configuration Default for project com.***.NDKDemo ****
ndk-build all 
Cannot run program "ndk-build": Unknown reason

Error: Program "ndk-build" not found in PATH
PATH=[/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games]

14:43:33 Build Finished (took 16ms)

Please give me a solution to include the build path in Eclipse..

//goto PreferenceAndroidNDK and choose your ndk location

在此输入图像描述

or

in your hidden .bashrc file add this below line

export NDK_PATH=/home/padmakumar/android-ndk-r7b

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.

The path for ndk-build is not set in your case. Open your .bashsrc file ( from root folder, it will be in hidden format, so Edit Menu and selection Show Hidden Files ) with Editor, go to last line and add following code,

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

Now restart your Computer and try again. For more information see my this answer .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM