protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); SDKInitializer.initialize(getApplicationContext()); setContentView(R.layout.activity_main); ...}报错 用的是studio ,.so文件也配置好了 一直报错 具体报错如下 : Process: com.example.ai.tabhostdemo, PID: 1287 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 com.example.ai.tabhostdemo.Act1.onCreate(Act1.java:46) at android.app.Activity.performCreate(Activity.java:5933) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251) at android.app.ActivityThread.startActivityNow(ActivityThread.java:2122) at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135) at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347) at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:756) at android.widget.TabHost.setCurrentTab(TabHost.java:420) at android.widget.TabHost.addTab(TabHost.java:247) at com.example.ai.tabhostdemo.MainActivity.setupIntent(MainActivity.java:97) at com.example.ai.tabhostdemo.MainActivity.onCreate(MainActivity.java:43) at android.app.Activity.performCreate(Activity.java:5933) 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)求解答啊!!!
我也遇到类似的问题,现在已经解决了(我用的是最新的as1.1.0版本,百度sdk也是最新3.3.0);
开始我怀疑是百度sdk版本的问题,但换成3.2.0后还是报一样的错。总结下应该是as 引用so库的问题,千万不能模仿官方demo中将so文件直接放在Libs下,官方demo环境是eclipse在src\main\目录下建立jniLibs目录,将armeabi/*.so拷贝进去即可参照博客地址:引用: