在编译cocos2d-x的helloworld 或者 tests的时候。
官网上使用ndk4、ndk5,这里是使用 ndkr7b、ndkr8或ndkr8b 。操作会简单很多,但是出了些小问题也是很坑人的。
下面出现如下编译错误
[javascript] view plaincopy
- Prebuilt : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/
- SharedLibrary : libcocos2d.so
- g:/handgame/tools/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/
[javascript] view plaincopy
- windows/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-
[javascript] view plaincopy
- androideabi/bin/ld.exe: cannot find ./obj/local/armeabi/libgnustl_static.a:
[javascript] view plaincopy
- Permission denied
- collect2: ld returned 1 exit status
- /cygdrive/g/HandGame/tools/android-ndk-r8b/build/core/build-binary.mk:378:
[javascript] view plaincopy
- recipe for target `obj/local/armeabi/libcocos2d.so' failed
在helloworld中找到Application.mk文件添加如下内容:STLPORT_FORCE_REBUILD := true