【问题标题】:Android NDK: ndk-build script fails - script "check-cygwin-make.mk" not foundAndroid NDK:ndk-build 脚本失败 - 找不到脚本“check-cygwin-make.mk”
【发布时间】:2011-10-07 12:38:30
【问题描述】:

我是使用 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/ 文件夹名称中的空格存在问题,我认为现在这不是问题。

我希望有人可以帮助我解决这个问题, 问候, 西蒙

【问题讨论】:

    标签: android cygwin android-ndk


    【解决方案1】:

    安装 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

    然后尝试使用您构建的步骤

    【讨论】:

      【解决方案2】:

      “check-cygwin-make.mk”位于“\android-ndk-r6b\build\core”中,您应该已将 Android NDK 安装到路径中没有空格的目录中。
      接下来,您应该从 Cygwin-shell 或使用命令“bash -c ndk-build”运行 ndk-build。
      当然,Cygwin 二进制文件(如上一个答案)和 ndk-build 的必要路径都应该在 PATH 中指定。

      【讨论】:

      • 我有android-ndk-r9d,没有构建目录
      猜你喜欢
      • 1970-01-01
      • 2010-10-11
      • 2019-08-28
      • 2011-11-30
      • 1970-01-01
      • 2023-03-19
      • 1970-01-01
      • 1970-01-01
      • 2016-12-29
      相关资源
      最近更新 更多