problems compiling project for android


#1

Hi, everybody

I’m trying compiling a project for android, but I have a problem compiling the build_native.sh 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/build-binary.mk:243: 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
@

Thankyou….
Andres Camilo


error_compilacion_android.jpg (217.7 KB)


#2

more evidences…


#3
  1. Open build_native.sh inside the proj.android 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.

#4

Lance, thankyou for the fast reply.

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

thanks…
Andres Camilo


#5

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


#6

ok Lance, thankyou… I going to try again…


#7

If you configured build_native.sh 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