Search code examples
androidcocos2d-x

Getting error while executing the ./build_native.sh from Cocos2d-x Android-Project


I'm getting error while executing the android-project created on Cocos2d-x, The error is:

$ ./build_native.sh
NDK_ROOT = D:\Updated Eclipse\android-ndk-r10
COCOS2DX_ROOT = /cygdrive/d/Cocos2d-x/cocos2d-x-2.2.5/projects/MyApp/proj.android/../../..
APP_ROOT = /cygdrive/d/Cocos2d-x/cocos2d-x-2.2.5/projects/MyApp/proj.android/..
APP_ANDROID_ROOT = /cygdrive/d/Cocos2d-x/cocos2d-x-2.2.5/projects/MyApp/proj.android
Using prebuilt externals
ERROR: You are using a non-Cygwin compatible Make program.
Currently using: D:/Cocos2d-X/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.

I have installed all the required SW and set the path, environment etc properly,

Cocos2d-x version: Cocos2d-x-2.2.5

Android ADT: Latest Android SDK

Android NDK: android-ndk-r10

Cygwin: 32-bit

Cygwin package installed autoconf, automake, binutils, gcc-core, gcc-g**, gcc4-core, gcc4-g**, gdb, pcre, pcre-devel, gawk, make

Python: python-2.7.8.msi

The Path and environment are:

ANDROID_NDK_PATH C:\Users\d\Documents\Android\ndk\android-ndk-r8d

COCOS2DX_ROOT D:\Cocos2d-X\cocos2d-x-2.2.5

GNUMAKE /usr/bin/make

NDK_PROJECT_PATH D:\Cocos2d-X\cocos2d-x-2.2.5\projects

NDK_ROOT D:\Updated Eclipse\android-ndk-r10

Path D:\Cocos2d-X\Cygwin\bin

Please help me to fix this issue.

Thanks


Solution

  • Your NDK is in a folder "Updated Eclipse". You need to rename your folder such that it does not have any space. After renaming, update your NDK path in "build_native.sh" and then try rebuilding.