Android NDK:ndk-build 脚本失败 - 脚本“check-cygwin-make.mk”未找到

发布于 2024-12-08 22:36:22 字数 1410 浏览 0 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冰火雁神 2024-12-15 22:36:22

安装 android-ndk 和 cygwin(使用“make”支持命令),然后设置像

Right-click My Computer, and then click Properties.
Click the Advanced tab.
Click Environment variables.
then edit"PATH" add this line

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

Right-click My Computer, and then click Properties.
Click the Advanced tab.
Click Environment variables.
then edit"PATH" add this line

C:\cygwin\bin like this

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files......;C:\cygwin\bin

then try with your built steps

忆梦 2024-12-15 22:36:22

“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文