Android NDK:ndk-build 脚本失败 - 脚本“check-cygwin-make.mk”未找到
我是 Android NDK 开发新手。 当我在 Win7 上进行开发时,我安装了 Cygwin 来构建本机二进制文件。
从项目文件夹 /home/simon/ndk/hello-neon 运行 ndk-build 时,我收到错误
ERROR: You are using a non-Cygwin compatible Make program.
Currently using: C:/Programs/cygwin/bin/make
To solve the issue, follow these steps:
1. Ensure that the Cygwin 'make' package is installed.
NOTE: You will need GNU Make 3.81 or later!
2. Define the GNUMAKE environment variable to point to it, as in:
export GNUMAKE=/usr/bin/make
3. Call 'ndk-build' again.
现在阻止我的问题是 ndk -build 脚本似乎无法在以下几行中调用 check-cygwin-make.mk 脚本:
GNUMAKE=`cygpath -u $GNUMAKE`
PROGDIR_MIXED=`cygpath -m $PROGDIR`
CYGWIN_GNUMAKE=`$GNUMAKE -f "$PROGDIR_MIXED/build/core/check-cygwin-make.mk" 2>&1`
调用时
echo $CYGWIN_GNUMAKE
我得到回复:
make: C:/Programs/cygwin/home/simon/build/core/check-cygwin-make.mk: No such fil
e or directory make: AndroidManifest.xml build.properties default.properties jni
res src No rule to make target `C:/Programs/cygwin/home/simon/build/core/check-
cygwin-make.mk'. Stop.
现在我迷路了,因为我不不明白的作用check-cygwin-make.mk 脚本,我在驱动器上的任何地方都找不到它。
我知道 C:/Program Files/ 文件夹名称中存在空格问题,并且我认为现在这不是问题。
我希望有人能帮助我解决这个问题 问候, 西蒙
I'm new to development with the NDK of Android.
As I'm developing on Win7 I installed Cygwin in order to build the native binaries.
When running ndk-build from the project folder /home/simon/ndk/hello-neon I get the error
ERROR: You are using a non-Cygwin compatible Make program.
Currently using: C:/Programs/cygwin/bin/make
To solve the issue, follow these steps:
1. Ensure that the Cygwin 'make' package is installed.
NOTE: You will need GNU Make 3.81 or later!
2. Define the GNUMAKE environment variable to point to it, as in:
export GNUMAKE=/usr/bin/make
3. Call 'ndk-build' again.
The problem that stops me now is that the ndk-build script seems not to be able to call the check-cygwin-make.mk script in the following lines:
GNUMAKE=`cygpath -u $GNUMAKE`
PROGDIR_MIXED=`cygpath -m $PROGDIR`
CYGWIN_GNUMAKE=`$GNUMAKE -f "$PROGDIR_MIXED/build/core/check-cygwin-make.mk" 2>&1`
When calling
echo $CYGWIN_GNUMAKE
I get the reply:
make: C:/Programs/cygwin/home/simon/build/core/check-cygwin-make.mk: No such fil
e or directory make: AndroidManifest.xml build.properties default.properties jni
res src No rule to make target `C:/Programs/cygwin/home/simon/build/core/check-
cygwin-make.mk'. Stop.
Now I'm lost because I don't understand the role of the check-cygwin-make.mk script and I could not find it anywhere on my drive.
I'm aware of the problem with spaces in the C:/Program Files/ folder name, and I think this is not problem now.
I hope someone can help my to solve this issue,
Regards,
Simon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
安装 android-ndk 和 cygwin(使用“make”支持命令),然后设置像
C:\cygwin\bin 这样的
变量%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32 \Wbem;C:\Program Files......;
C:\cygwin\bin
然后尝试使用您构建的步骤
Install android-ndk and cygwin(with "make" support command) then set the varaibles like this
C:\cygwin\bin like this
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files......;
C:\cygwin\bin
then try with your built steps
“check-cygwin-make.mk”位于“\android-ndk-r6b\build\core”中,您应该将 Android NDK 安装到路径中不带空格的目录中。
接下来,您应该从 Cygwin-shell 或使用命令“bash -c ndk-build”运行 ndk-build。
当然,Cygwin 二进制文件(如前面的答案)和 ndk-build 的必要路径应在 PATH 中指定。
'check-cygwin-make.mk' is in '\android-ndk-r6b\build\core', and you should have installed Android NDK to a directory without spaces in the path.
Next you should be running ndk-build either from Cygwin-shell, or with the command 'bash -c ndk-build'.
And of course the necessary paths both to Cygwin binaries (as in the previous answer), and to ndk-build should be specified in PATH.