【发布时间】:2015-05-09 08:27:13
【问题描述】:
我正在使用 Eclipse for android-ndk 在 mac 中开发 android 应用程序。我已经在 Eclipse 中给出了 NDK 路径。最后,当我给出这个命令来使用 android-ndk 构建我的应用程序但得到以下错误:
command: ndk-build
ndk-build-bash: ndk-build: command not found
我的终端命令:
Muhammads-MacBook-Pro:~ UsmanKhan$ cd downloads
Muhammads-MacBook-Pro:downloads UsmanKhan$ cd 26thMarch2014
Muhammads-MacBook-Pro:26thMarch2014 UsmanKhan$ cd a2zLatest
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls
AndroidManifest.xml gen proguard-project.txt
Thumbs.db ic_launcher-web.png project.properties
assets libs res
bin lint.xml src
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls bin/classes/
com
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls bin/classes/com/testing/ndk
BuildConfig.class R$dimen.class R$string.class
FibLib.class R$drawable.class R$style.class
MainActivity.class R$id.class R.class
R$attr.class R$layout.class
R$color.class R$menu.class
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ mkdir jni
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ javah -jni -classpath bin /classes/ -d jni/ com.testing.ndk.FibLib
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls jni
com_testing_ndk_FibLib.h
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ls jni
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ javah -jni -classpath bin/classes/ -d jni/ com.testing.ndk.FibLib
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ javah -jni -classpath bin/classes/ -d jni/ com.testing.ndk.FibLib
Muhammads-MacBook-Pro:a2zLatest UsmanKhan$ ndk-build
-bash: ndk: command not found
最后我收到 ndk-build 错误。
【问题讨论】:
-
你能提供一些关于你如何在eclipse中定义ndk路径的截图吗?
-
ANDROID_NDK_ROOT和ANDROID_SDK_ROOT的值是多少?另请参阅 Android NDK 邮件列表中的Recommended NDK Directory?。 -
@jww 感谢您的回复。我没有为 ANDROID_NDK_ROOT 和 ANDROID_SDK_ROOT 提供任何明确的值,我只是在我的 Eclipse 首选项中给出了我的 NDK 的位置。你能指导我做这件事吗?
标签: android eclipse bash android-ndk