01-05 16:13:51.504: E/AndroidRuntime(9886): java.lang.UnsatisfiedLinkError: Native method not found: com.baidu.mapapi.Mj.InitMapControlCC:(II)I
01-05 16:13:51.504: E/AndroidRuntime(9886): at com.baidu.mapapi.Mj.InitMapControlCC(Native Method)
01-05 16:13:51.504: E/AndroidRuntime(9886): at com.baidu.mapapi.MapActivity.initMapActivity(Unknown Source)
01-05 16:13:51.504: E/AndroidRuntime(9886): at com.dobest.smartphone.activitys.LocationActivity.onCreate(LocationActivity.java:55)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.app.Activity.performCreate(Activity.java:5191)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.app.ActivityThread.startActivityNow(ActivityThread.java:1941)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:705)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.widget.TabHost.setCurrentTab(TabHost.java:369)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:150)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:560)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.view.View.performClick(View.java:4223)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.view.View$PerformClick.run(View.java:17275)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.os.Handler.handleCallback(Handler.java:615)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.os.Handler.dispatchMessage(Handler.java:92)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.os.Looper.loop(Looper.java:137)
01-05 16:13:51.504: E/AndroidRuntime(9886): at android.app.ActivityThread.main(ActivityThread.java:4898)
01-05 16:13:51.504: E/AndroidRuntime(9886): at java.lang.reflect.Method.invokeNative(Native Method)
01-05 16:13:51.504: E/AndroidRuntime(9886): at java.lang.reflect.Method.invoke(Method.java:511)
01-05 16:13:51.504: E/AndroidRuntime(9886): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
01-05 16:13:51.504: E/AndroidRuntime(9886): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
01-05 16:13:51.504: E/AndroidRuntime(9886): at dalvik.system.NativeStart.main(Native Method)
解决方案:
mBMapMan=new BMapManager(getApplication());
mBMapMan.init(null);
这两行代码对百度地图进行初始化,必须放在setContentView()之前,否则就会出现上面的错误。