开发者

Android NDK: ndk-build script fails - script "check-cygwin-make.mk" not found

开发者 https://www.devze.com 2023-04-11 23:36 出处:网络
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.

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 r开发者_开发百科eply:

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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号