当前位置:   article > 正文

调用百度地图 5.0手机报错java.lang.UnsatisfiedLinkError: No implementation found for int_引用百度地图版本是5.0

引用百度地图版本是5.0

转载请注明:http://blog.csdn.net/seven2729/article/details/48289101

调用百度地图   5.0以上手机报错,黑屏或者白屏并闪退

报错日志

java.lang.UnsatisfiedLinkError: No implementation found for int com.baidu.platform.comjni.map.commonmemcache.JNICommonMemCache.Create() (tried Java_com_baidu_platform_comjni_map_commonmemcache_JNICommonMemCache_Create and Java_com_baidu_platform_comjni_map_commonmemcache_JNICommonMemCache_Create__)
        at com.baidu.platform.comjni.map.commonmemcache.JNICommonMemCache.Create(Native Method)
        at com.baidu.platform.comjni.map.commonmemcache.a.a(Unknown Source)
        at com.baidu.platform.comapi.c.c.b(Unknown Source)
        at com.baidu.mapapi.a.c(Unknown Source)
        at com.baidu.mapapi.SDKInitializer.initialize(Unknown Source)
        at com.baidu.mapapi.SDKInitializer.initialize(Unknown Source)
        at xxx.xxxxx.xxx.XxxxApplication.onCreate(XxxxApplication.java:108)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1016)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4797)
        at android.app.ActivityThread.access$1500(ActivityThread.java:176)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1498)
        at android.os.Handler.dispatchMessage(Handler.java:111)
        at android.os.Looper.loop(Looper.java:194)
        at android.app.ActivityThread.main(ActivityThread.java:5578)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)

或者

java.lang.UnsatisfiedLinkError: No implementation found for long com.baidu.platform.comjni.map.commonmemcache.JNICommonMemCache.Create() (tried Java_com_baidu_platform_comjni_map_commonmemcache_JNICommonMemCache_Create and Java_com_baidu_platform_comjni_map_commonmemcache_JNICommonMemCache_Create__)
            at com.baidu.platform.comjni.map.commonmemcache.JNICommonMemCache.Create(Native Method)
            at com.baidu.platform.comjni.map.commonmemcache.a.a(Unknown Source)
            at com.baidu.platform.comapi.e.c.b(Unknown Source)
            at com.baidu.mapapi.a.c(Unknown Source)
            at com.baidu.mapapi.SDKInitializer.initialize(Unknown Source)
            at com.baidu.mapapi.SDKInitializer.initialize(Unknown Source)
            at com.imooc.baidumap.MainActivity.onCreate(MainActivity.java:53)
            at android.app.Activity.performCreate(Activity.java:5937)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)

均为so文件缺失报的错误


解决方法:

1.只保留了项目lib下的2个文件夹 armeabi和armeabi-v7a

2.去百度官网重新下载libs文件。

"arm64-v8a", "armeabi", "armeabi-v7a", "mips", "x86" 等资源包记得都要放so文件。如果多个第三方集成,尽量不要放空。不然又会报错

记得gradle 文件记得添加以下内容

sourceSets {
    main {
        jniLibs.srcDirs = ['libs']
    }
}

 
 


转载请注明:http://blog.csdn.net/seven2729/article/details/48289101

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/66239
推荐阅读
相关标签
  

闽ICP备14008679号