cocos2d-js 3.7的全新项目,Facebook插件在JNI_OnLoad崩溃 什么可能是错的暗示? 我已经开始使用运行正常的新项目,然后根据以下内容手动集成FB插件:https://github.com/chukong/cocos-docs/blob/master/manual/framework/html5/jsb/plugin-x/how-to-use-plugin-x-on-android/en.md
D/JniHelper( 7432): JniHelper::setJavaVM(0xb515c280), pthread_self() = -1224978744
--------- beginning of crash
F/libc ( 7432): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 7432 (li.android.free)
I/DEBUG ( 240): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 240): Build fingerprint: 'oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS2I3:user/release-keys'
I/DEBUG ( 240): Revision: '0'
I/DEBUG ( 240): ABI: 'arm'
I/DEBUG ( 240): pid: 7432, tid: 7432, name: li.android.free >>> cz.volten.brili.android.free <<<
I/DEBUG ( 240): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
I/DEBUG ( 240): r0 b5151240 r1 03ffffff r2 00000001 r3 b5151240
I/DEBUG ( 240): r4 00000043 r5 b5118228 r6 a18ad984 r7 00000000
I/DEBUG ( 240): r8 b5107800 r9 b50fcc7c sl beb3be48 fp beb3bc74
I/DEBUG ( 240): ip a306db2c sp beb3bc68 lr a18ad9b0 pc 00000000 cpsr 60010010
I/DEBUG ( 240):
I/DEBUG ( 240): backtrace:
I/DEBUG ( 240): #00 pc 00000000 <unknown>
I/DEBUG ( 240): #01 pc 00dc49ac /data/app/cz.volten.brili.android.free-1/lib/arm/libcocos2djs.so (JNI_OnLoad+40)
I/DEBUG ( 240): #02 pc 001ceecf /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, art::Handle<art::mirror::ClassLoader>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+1478)
I/DEBUG ( 240): #03 pc 001f4b8d /system/lib/libart.so (art::Runtime_nativeLoad(_JNIEnv*, _jclass*, _jstring*, _jobject*, _jstring*)+548)
I/DEBUG ( 240): #04 pc 000777f9 /data/dalvik-cache/arm/system@framework@boot.oat
I/DEBUG ( 240):
I/DEBUG ( 240): Tombstone written to: /data/tombstones/tombstone_01
W/li.android.free( 7432): type=1701 audit(0.0:173): auid=4294967295 uid=10332 gid=10332 ses=4294967295 subj=u:r:untrusted_app:s0 reason="memory violation" sig=11
答案 0 :(得分:2)
在main.cpp
:
错误的代码(3.5方式):
void cocos_android_app_init (JNIEnv* env, jobject thiz) {
有效代码(3.7方式):
void cocos_android_app_init (JNIEnv* env) {