构建时的错误是
/ndk-build
Cannot run program "/ndk-build": Unknown reason
Error: Program "/ndk-build" is not found in PATH
PATH=[/usr/bin:/bin:/usr/sbin:/sbin]
我正在尝试在 Eclipse ADT 上构建一个 OpenCV 项目,并且到目前为止已经完成了以下操作来构建它。普通的 android 项目(不涉及 c/c++ 代码)工作正常。
1-我已将 /etc/paths 编辑为以下内容
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
PATH=$PATH:/Users/mohitagrawal/adt-bundle-mac-x86_64-20130219/sdk/tools
PATH=$PATH:/Users/mohitagrawal/adt-bundle-mac-x86_64-20130219/sdk/platfor
m-tools
PATH=$PATH:/Users/mohitagrawal/android-ndk-r8e
2- 我已将 $PATH 编辑为跟随(有意或无意)
-bash: /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
PATH=$PATH:/Users/mohitagrawal/adt-bundle-mac-x86_64-20130219/sdk/tools:PATH=$PATH:/Users/mohitagrawal/adt-bundle-mac-x86_64-20130219/sdk/platfor:m-tools:
PATH=$PATH:/Users/mohitagrawal/android-ndk-r8e:/opt/X11/bin:/usr/local/git/bin:/usr/texbin: No such file or directory
3-项目属性中“C/C++ Build”中的构建命令设置为
${NDK_ROOT}/ndk-build
4- ADT eclipse 首选项中的 NDK 位置设置为
/Users/mohitagrawal/android-ndk-r8e
请帮我。我被困了很多天,甚至尝试过不同的平台。