From a freshly extracted cocos2d-x (latest stable), I run the create_android_project.bat after pointing the variables in the right direction. I get several permission denied errors at the end of the script (see attached image). These errors are coming from areas that the script itself is supposedly creating. Why does this happen? I tried running as root, but of course the script just told me I’m not allowed to run as root.
I had the same trouble. ( since version cocos2d-1.0.1-x-0.11.0 ^^ )
I change permissions on COCO2DX_DIR/HelloWorld folder to 755.
To do that, in your cygwin term.
change current folder to COCOS2DX_DIR.
run : chmod -R 755 HelloWorld
It seems that the archive file have strange permissions for this folder and create_android_project.bat copies some files from it to create the new project.
I try to change permissions with Windows Explorer but the problem still occurs.
This problem only occurs when you put cocos2d-x on an NTFS disk…
You can simply write a shell script to change all file’s permission for those files which will be use when compiling.
Had same problem to. Chmod things didnt fix it for me
So i wrote a bat file that fix it everytime I want to run on Android.
I just save the bat and then I drag the folder of android in the bat file.
Here is the script.
@Echo Off
If [%*]==[] Echo No Folder entered&Goto:EOF
If NOT Exist "%*" Echo This folder %* does not exist&Goto:EOF
If Exist "%*\Private" (
PushD %*
For /D %%I In (*) Do (
If /I Not "%%I"=="Private" cacls "%%I" /t /e /c /g Everyone:w&cacls "%%I" /t /e /c /g Everyone:c
)
PopD
) Else (
cacls "%*" /t /e /c /g Everyone:w
cacls "%*" /t /e /c /g Everyone:c
)