Ndk-cygwin 路径特定问题
有趣的 Windows XP、CYGWIN 和 Windows XP我的项目的 ndk 。我映射了 cygwin.batch 文件中的所有路径。我正在尝试通过 cygwin 编译 hello-jni。
cygwin.bat 的内容
@echo off
F:
chdir F:\Cygwin\bin
bash --login -i
set IS_UNIX=
set DEV_ROOT=E:/android/android-ndk-r5b/samples/hello-jni
set JAVA_HOME=C:/Program Files/Java/jdk1.5.0_13
set CLASSPATH=d:/work_code/android/BlueInput/obj
set PATH=E:/android/android-sdk-windows/tools;E:/android/android-ndk-r5b
set ANDROID_NDK_ROOT=/cygdrive/e/android/android-ndk-r5b
set NDK_PROJECT_PATH=/cygdrive/e/android/android-ndk-r5b/samples/hello-jni
在执行命令 ./ndk-build 时,出现错误...
Android NDK: Could not find application project directory!
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
cygdrive\e\android\android-ndk-r5b\build\core\build-local.mk:"Android NDK aborting"
Amusing windows xp, cygwin & ndk for my project. I mapped all path in the cygwin.batch file. I am trying to compile hello-jni by cygwin.
Contents of cygwin.bat
@echo off
F:
chdir F:\Cygwin\bin
bash --login -i
set IS_UNIX=
set DEV_ROOT=E:/android/android-ndk-r5b/samples/hello-jni
set JAVA_HOME=C:/Program Files/Java/jdk1.5.0_13
set CLASSPATH=d:/work_code/android/BlueInput/obj
set PATH=E:/android/android-sdk-windows/tools;E:/android/android-ndk-r5b
set ANDROID_NDK_ROOT=/cygdrive/e/android/android-ndk-r5b
set NDK_PROJECT_PATH=/cygdrive/e/android/android-ndk-r5b/samples/hello-jni
on executing the command ./ndk-build, am getting the error...
Android NDK: Could not find application project directory!
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
cygdrive\e\android\android-ndk-r5b\build\core\build-local.mk:"Android NDK aborting"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
父文件夹应该是“jni”,然后在你的 Android.mk 中
The parent folder should be "jni" and then inside your Android.mk
从项目的 jni 文件夹(Android.mk 所在的文件夹和您的 c/c++ 文件)触发 ndk-build 脚本,而不是从 android-ndk 目录。
Trigger ndk-build script from your project's jni folder (the folder where Android.mk is located and your c/c++ files) and not from the android-ndk directory.