coco2d-x-3.7.1 android-ndk-r9d环境下执行编译项目,so文件和apk都生成了
-post-build:
debug:
BUILD SUCCESSFUL
Total time: 7 seconds
正在移动 apk 文件 /Users/jonze/Documents/cocos/Game-AA/bin/debug/android
编译成功。
NDK 版本低于 r10c。
程序中如果使用了 BMFont 和 HttpClient,在 Android 5.0 的设备上可能出现崩溃或卡死的情况。
请参考:
https://github.com/cocos2d/cocos2d-x/issues/9114
https://github.com/cocos2d/cocos2d-x/issues/9138
NDK_TOOLCHAIN_VERSION 为 4.8,程序中如果使用了 c++ 11 正则表达式,可能会崩溃
但是把apk装到设备上运行时就报错,错误如下:
09-21 1602.970: ERROR/AndroidRuntime(29560): FATAL EXCEPTION: main
09-21 1602.970: ERROR/AndroidRuntime(29560): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol “_ZN10LineSprite16createLineSpriteEv” referenced by “libcocos2dcpp.so”…
09-21 1602.970: ERROR/AndroidRuntime(29560): at java.lang.Runtime.loadLibrary(Runtime.java:365)
09-21 1602.970: ERROR/AndroidRuntime(29560): at java.lang.System.loadLibrary(System.java:514)
09-21 1602.970: ERROR/AndroidRuntime(29560): at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:207)
09-21 1602.970: ERROR/AndroidRuntime(29560): at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:222)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.app.Activity.performCreate(Activity.java:5122)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2283)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2371)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.app.ActivityThread.access$600(ActivityThread.java:164)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1348)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.os.Handler.dispatchMessage(Handler.java:99)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.os.Looper.loop(Looper.java:153)
09-21 1602.970: ERROR/AndroidRuntime(29560): at android.app.ActivityThread.main(ActivityThread.java:5314)
09-21 1602.970: ERROR/AndroidRuntime(29560): at java.lang.reflect.Method.invokeNative(Native Method)
09-21 1602.970: ERROR/AndroidRuntime(29560): at java.lang.reflect.Method.invoke(Method.java:511)
09-21 1602.970: ERROR/AndroidRuntime(29560): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-21 1602.970: ERROR/AndroidRuntime(29560): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
09-21 1602.970: ERROR/AndroidRuntime(29560): at dalvik.system.NativeStart.main(Native Method)
09-21 1603.040: ERROR/AppErrorDialog(632): Failed to get ILowStorageHandle instance
09-21 1604.873: ERROR/BufferQueue(644): (this:0x42577d28,api:2) connect: already connected (cur=2, req=1)
09-21 1604.875: ERROR/libEGL(739): EGLNativeWindowType 0x5f18f228 already connected to another API
09-21 1604.875: ERROR/libEGL(739): eglCreateWindowSurface:298 error 300b (EGL_BAD_NATIVE_WINDOW)
09-21 1604.876: ERROR/ImageWallpaperGL(739): createWindowSurface returned EGL_BAD_NATIVE_WINDOW.
09-21 1604.876: ERROR/libEGL(739): eglDestroySurface:383 error 300d (EGL_BAD_SURFACE)
请问大神们,这到底是哪里出现了问题?无从下手了。。。。