problems compiling project for android


Hi, everybody

I’m trying compiling a project for android, but I have a problem compiling the file with cygwin. I followed the tutorial step by step, but the cygwin show me this error:

cc1plus.exe: error: jni/hellocpp/main.cpp: Permission denied
/cygdrive/c/Android/androidNDK8/build/core/ recipe for target `obj/local/armeabi/objs-debug/game_shared/hellocpp/main.o’ failed
make: * [obj/local/armeabi/objs-debug/game_shared/hellocpp/main.o] Error 1

Andres Camilo

error_compilacion_android.jpg (217.7 KB)


more evidences…

  1. Open inside the file with Notepad++ or just Notepad. Replace the line with C:\Android\androidNDK8\/ndk-build with /cygwin/c/Android/androidNDK8/ndk-build
  2. You Android Virtual Device must be 4.1 with GPU emulation enabled.


Lance, thankyou for the fast reply.

Lance, Excuse me for my Ignorance but in file I don’t see any line with that path…

Andres Camilo


You might need to properly set up your cygwin environment.
You are using windows, right? Try re-installing your cocos2d-x following this guide.


ok Lance, thankyou… I going to try again…


If you configured preperly then you have to change the file path permission.If you want to change permission of a file or directory then you have to add full path with the code.

As if you want to change permission on cocos2d-x folder on C:2d-x (Im on windows on mack it will be “/ instead of” write the code on cygwin console:

cmod -R 775 /cygwindrive/c/cocos2d-x

Happy coding.Thanks