[英]Set Build path in Eclipse for ndk program
This error was shown when I build a android application program in Eclipse: 我在Eclipse中构建一个Android应用程序时显示了这个错误:
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.. 请给我一个解决方案,在Eclipse中包含构建路径。
//goto Preference → Android → NDK and choose your ndk location //转到首选项 → Android → NDK并选择您的ndk位置
or 要么
in your hidden .bashrc file add this below line 在您隐藏的.bashrc文件中添加以下行
export NDK_PATH=/home/padmakumar/android-ndk-r7b
If your NDK location is already set, the builder in the toolchain editor may be wrong. 如果已设置NDK位置,则工具链编辑器中的构建器可能错误。 Go to project properties, C/C++ Build |
转到项目属性,C / C ++ Build | Tool Chain Editor and select Android Builder as current builder.
工具链编辑器并选择Android Builder作为当前构建器。
The path for ndk-build is not set in your case. 在您的情况下,未设置ndk-build的路径。 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,
使用编辑器打开.bashsrc文件(从根文件夹,它将采用隐藏格式,因此编辑菜单和选择显示隐藏文件),转到最后一行并添加以下代码,
NDK_HOME=/opt/android-ndk-r8
export NDK_HOME
Now restart your Computer and try again. 现在重新启动计算机,然后重试。 For more information see my this answer .
有关更多信息,请参阅我的答案 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.