new android project with cocos2d-x build error

Virgil@Virgil-PC /cygdrive/d/cocos2d/samplecocos2dx/android
$ ./build_native.sh
make: 进入目录“/cygdrive/d/cocos2d/samplecocos2dx/android”
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
SharedLibrary : libcocosdenshion.so
D:/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/…/lib/gcc/arm-linux-androideabi/4.4.3/…/…/…/…/arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libgnustl_static.a: No such file: Permission denied
collect2: ld returned 1 exit status
/cygdrive/d/android-ndk-r8/build/core/build-binary.mk:369: recipe for target `obj/local/armeabi/libcocosdenshion.so’ failed
make: * [obj/local/armeabi/libcocosdenshion.so] Error 1
make: 离开目录“/cygdrive/d/cocos2d/samplecocos2dx/android”

i use win7 os

Hello,

I have the same problem ? Did you solve it?
I’ve tried to do this [[https://groups.google.com/group/android-ndk/browse_thread/thread/a7ecc279f12b30e6]] but no luck.
Thanks

HI,
the error shows “No such file: Permission denied.”

you should changed your file’s attribute of /obj/local/armeabi/libgnustl_static.a ,added modify right.

Hi,
I experienced the same issue but on the Androïd.mk file…
I don’t find the “libgnustl_static.a”. Where does the path start ? Is it in cocos2d-2.0 folder ?

Anyway I tried to compile like this but encounter another issue and didn’t found real help from other topics.

I don’t know if problems are linked but I see that there could be bad declaration order in some files that lead to these errors…

Any help about this problem ?

In my understanding you cannot find libgnustl_static.a.
this file was created during building android project, and located in the .android\obj\local\armeabi\libgnustl_static.a
Open properties of that file and give read&write permission.

I have successfully change the permission of my whole project directory and turn of UAC to be sure the batch could access what it needs but I have always the same three errors.
Please check my screenshot with my previous post.

For some reason I can’t explain my windows user account had no permission to read this file.

cocos2d-x\PROJECT\proj.android\obj\local\armeabi\libgnustl_static.a

To fix it I simply right clicked the file and added permission in the security tab.

I had also tried the fix Timur mentioned without success.

This is an old issue but, I managed to solve it through this link

http://stackoverflow.com/questions/17260935/cocos2d-x-undefined-reference

“You must add the reference of the new cpp file into the Android.mk of the corresponding jni directory.”

Hope this helps