我正在尝试编译Hello-jni示例,但我仍然收到此错误:
*ERROR: You are using a non-Cygwin compatible Make program.
Currently using: C:/AndroidNDK/android-ndk-r8e/prebuilt/windows-x86_64/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.*
我第一次收到此错误时,发现安装目录中的空间问题(它安装在c:\ Program Files ...中)。所以我把它移到了C:/ AndroidNDK / android-ndk-r8e /但我仍然得到了错误。然后我尝试重新安装cygwin(使用make包),android-NDK但错误始终在这里!
当我回复$ CYGWIN_GNUMAKE时,我有这个:
$ ndk-build NDK_LOG=1
HOST_OS=cygwin
HOST_ARCH=x86
HOST_TAG=cygwin-x86
GNUMAKE=/cygdrive/c/AndroidNDK/android-ndk-r8e/prebuilt/windows-x86_64/bin/make (system path)
CYGWIN_GNUMAKE=C:/AndroidNDK/android-ndk-r8e/build/core/check-cygwin-make.mk:43: Android.mk hello-jni.c Android NDK: C:/AndroidNDK/android-ndk-r8e/prebuilt/windows-x86_64/bin/make is not cygwin-compatible. Stop.
Cygwin-compatible GNU make detected
make: /cygdrive/c/AndroidNDK/android-ndk-r8e/build/core/build-local.mk: No such file or directory
make: *** No rule to make target `/cygdrive/c/AndroidNDK/android-ndk-r8e/build/core/build-local.mk'. Stop.
奇怪的是,我在这里发出了“与Cygwin兼容的GNU make detect”的消息,但它仍然无法正常工作。如果有人有一个想法,我真的很感激,现在已经两天了,我正试图解决它... 顺便说一下,我是linux shell的初学者:)
答案 0 :(得分:0)
感谢swetha kini的帮助,但正如我所说,我的目录名称不包含空格(即C:\ AndroidNDK \ android-ndk-r8e)。最后我发现了这个问题:在cygwin路径中“C:\ AndroidNDK \ android-ndk-r8e”在“/ usr / local / bin:/ usr / bin:/ bin”之前,我只是交换,现在它可以工作。 / p>