搜尋

首頁  >  問答  >  主體

android - 使用百度sdk调用SDKInitializer.initialize(this)时报错?

07-24 14:45:59.525 27354-27354/com.xinguan14.jdyp E/NativeLoader: found libBaiduMapSDK_base_v4_0_0.so error
07-24 14:45:59.527 27354-27354/com.xinguan14.jdyp E/art: No implementation found for int com.baidu.platform.comjni.engine.JNIEngine.initClass(java.lang.Object, int) (tried Java_com_baidu_platform_comjni_engine_JNIEngine_initClass and Java_com_baidu_platform_comjni_engine_JNIEngine_initClass__Ljava_lang_Object_2I)
07-24 14:45:59.527 27354-27354/com.xinguan14.jdyp D/AndroidRuntime: Shutting down VM
                                                                    
                                                                    
                                                                    --------- beginning of crash
07-24 14:45:59.528 27354-27354/com.xinguan14.jdyp E/AndroidRuntime: FATAL EXCEPTION: main
                                                                    Process: com.xinguan14.jdyp, PID: 27354
                                                                    java.lang.UnsatisfiedLinkError: No implementation found for int com.baidu.platform.comjni.engine.JNIEngine.initClass(java.lang.Object, int) (tried Java_com_baidu_platform_comjni_engine_JNIEngine_initClass and Java_com_baidu_platform_comjni_engine_JNIEngine_initClass__Ljava_lang_Object_2I)
                                                                        at com.baidu.platform.comjni.engine.JNIEngine.initClass(Native Method)
                                                                        at com.baidu.platform.comjni.engine.AppEngine.InitClass(Unknown Source)
                                                                        at com.baidu.platform.comapi.a.<clinit>(Unknown Source)
                                                                        at com.baidu.platform.comapi.b.a(Unknown Source)
                                                                        at com.baidu.mapapi.SDKInitializer.initialize(Unknown Source)
                                                                        at com.baidu.mapapi.SDKInitializer.initialize(Unknown Source)
                                                                        at com.xinguan14.jdyp.MyApplication.initBaidu(MyApplication.java:146)
                                                                        at com.xinguan14.jdyp.MyApplication.onCreate(MyApplication.java:60)
                                                                        at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369)
                                                                        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
                                                                        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4726)
                                                                        at android.app.ActivityThread.access$1600(ActivityThread.java:153)
                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
                                                                        at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                        at android.os.Looper.loop(Looper.java:148)
                                                                        at android.app.ActivityThread.main(ActivityThread.java:5438)
                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
07-24 14:45:59.537 27354-27354/com.xinguan14.jdyp I/Process: Sending signal. PID: 27354 SIG: 9
07-24 14:46:09.949 27512-27564/com.xinguan14.jdyp W/System: ClassLoader referenced unknown path: /system/framework/tcmclient.jar
07-24 14:46:10.150 27544-27544/com.xinguan14.jdyp:bmobcore E/NativeLoader: found libBaiduMapSDK_base_v4_0_0.so error
07-24 14:46:10.152 27544-27544/com.xinguan14.jdyp:bmobcore E/art: No implementation found for int com.baidu.platform.comjni.engine.JNIEngine.initClass(java.lang.Object, int) (tried Java_com_baidu_platform_comjni_engine_JNIEngine_initClass and Java_com_baidu_platform_comjni_engine_JNIEngine_initClass__Ljava_lang_Object_2I)
07-24 14:46:10.152 27544-27544/com.xinguan14.jdyp:bmobcore D/AndroidRuntime: Shutting down VM
07-24 14:46:10.153 27544-27544/com.xinguan14.jdyp:bmobcore E/AndroidRuntime: FATAL EXCEPTION: main
                                                                             Process: com.xinguan14.jdyp:bmobcore, PID: 27544
                                                                             java.lang.UnsatisfiedLinkError: No implementation found for int com.baidu.platform.comjni.engine.JNIEngine.initClass(java.lang.Object, int) (tried Java_com_baidu_platform_comjni_engine_JNIEngine_initClass and Java_com_baidu_platform_comjni_engine_JNIEngine_initClass__Ljava_lang_Object_2I)
                                                                                 at com.baidu.platform.comjni.engine.JNIEngine.initClass(Native Method)
                                                                                 at com.baidu.platform.comjni.engine.AppEngine.InitClass(Unknown Source)
                                                                                 at com.baidu.platform.comapi.a.<clinit>(Unknown Source)
                                                                                 at com.baidu.platform.comapi.b.a(Unknown Source)
                                                                                 at com.baidu.mapapi.SDKInitializer.initialize(Unknown Source)
                                                                                 at com.baidu.mapapi.SDKInitializer.initialize(Unknown Source)
                                                                                 at com.xinguan14.jdyp.MyApplication.initBaidu(MyApplication.java:146)
                                                                                 at com.xinguan14.jdyp.MyApplication.onCreate(MyApplication.java:60)
                                                                                 at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:369)
                                                                                 at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
                                                                                 at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4726)
                                                                                 at android.app.ActivityThread.access$1600(ActivityThread.java:153)
                                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
                                                                                 at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                 at android.os.Looper.loop(Looper.java:148)
                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5438)
                                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
黄舟黄舟2772 天前1050

全部回覆(6)我來回復

  • 迷茫

    迷茫2017-04-17 17:30:39

    已經解決了。 so檔的位置問題

    回覆
    0
  • 天蓬老师

    天蓬老师2017-04-17 17:30:39

    .so檔案的問題,下載最新百度sdk,在main下新建jniLibs資料夾,複製到裡面

    回覆
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:30:39

    估計是你庫沒有導入完整,看看你的.so檔是不是都導入了

    回覆
    0
  • 黄舟

    黄舟2017-04-17 17:30:39

    看報錯應該是你的.so檔案的問題,有可能你使用的是模擬器,建議使用真機調試。

    回覆
    0
  • PHPz

    PHPz2017-04-17 17:30:39

    07-24 14:45:59.525 27354-27354/com.xinguan14.jdyp E/NativeLoader: found libBaiduMapSDK_base_v4_0_0.so error

    so庫沒有正確導入吧?或者so庫跟jar包的版本不對應。

    关于android studio导入so库的方法,请看方法5 http://blog.csdn.net/yy1300326388/article/details/46422939

    回覆
    0
  • PHPz

    PHPz2017-04-17 17:30:39

    把jar包全放在libs目錄而不是lib目錄,多搞幾下又好了。

    回覆
    0
  • 取消回覆