调用了百度地图地图开发包是baidumapapi_v2_1_1.jar,定位SDK版本是locSDK_3.3.jar
调试的时候能运行!可是打包签名后就运行不了!
baidu google 了好久!最后还是自己解决的!
解决方法如下:
-keep class com.baidu.** {
*;
}
记住别
-keep class com.baidu.** {
public protect *;
}
否则就报错:
06-21 17:53:03.123: I/ActivityManager(580): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.jemsn.android/.Logo bnds=[253,315][343,405] u=0} from pid 2133
06-21 17:53:03.303: I/ActivityManager(580): Start proc com.jemsn.android for activity com.jemsn.android/.Logo: pid=29708 uid=10021 gids={3002, 3001, 1006, 1015, 3003, 1028}
06-21 17:53:03.393: E/Trace(29708): error opening trace file: No such file or directory (2)
06-21 17:53:03.533: W/dalvikvm(29708): threadid=1: thread exiting with uncaught exception (group=0x42096360)
06-21 17:53:03.533: E/AndroidRuntime(29708): FATAL EXCEPTION: main
06-21 17:53:03.533: E/AndroidRuntime(29708): java.lang.NoSuchMethodError: no static method with name='postMessage' signature='(III)V' in class Lcom/baidu/vi/VMsg;
06-21 17:53:03.533: E/AndroidRuntime(29708): at com.baidu.platform.comjni.engine.JNIEngine.InitEngine(Native Method)
06-21 17:53:03.533: E/AndroidRuntime(29708): at com.baidu.platform.comjni.engine.AppEngine.InitEngine(Unknown Source)
06-21 17:53:03.533: E/AndroidRuntime(29708): at com.baidu.platform.comapi.a.a(Unknown Source)
06-21 17:53:03.533: E/AndroidRuntime(29708): at com.baidu.mapapi.BMapManager.init(Unknown Source)
06-21 17:53:03.533: E/AndroidRuntime(29708): at com.jemsn.android.BMapApiDemoApp.onCreate(Unknown Source)
06-21 17:53:03.533: E/AndroidRuntime(29708): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
06-21 17:53:03.533: E/AndroidRuntime(29708): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4203)
06-21 17:53:03.533: E/AndroidRuntime(29708): at android.app.ActivityThread.access$1300(ActivityThread.java:136)
06-21 17:53:03.533: E/AndroidRuntime(29708): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
06-21 17:53:03.533: E/AndroidRuntime(29708): at android.os.Handler.dispatchMessage(Handler.java:99)
06-21 17:53:03.533: E/AndroidRuntime(29708): at android.os.Looper.loop(Looper.java:137)
06-21 17:53:03.533: E/AndroidRuntime(29708): at android.app.ActivityThread.main(ActivityThread.java:4797)
06-21 17:53:03.533: E/AndroidRuntime(29708): at java.lang.reflect.Method.invokeNative(Native Method)
06-21 17:53:03.533: E/AndroidRuntime(29708): at java.lang.reflect.Method.invoke(Method.java:511)
06-21 17:53:03.533: E/AndroidRuntime(29708): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
06-21 17:53:03.533: E/AndroidRuntime(29708): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
06-21 17:53:03.533: E/AndroidRuntime(29708): at dalvik.system.NativeStart.main(Native Method)
06-21 17:53:03.543: W/ActivityManager(580): Force finishing activity com.jemsn.android/.Logo
06-21 17:53:03.663: I/ActivityManager(580): Process com.jemsn.android (pid 29708) has died.
06-21 17:53:03.703: W/InputMethodManagerService(580): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42e27a30 attribute=null
06-21 17:53:04.563: I/ActivityManager(580): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.jemsn.android/.Logo bnds=[253,315][343,405] u=0} from pid 2133
06-21 17:53:04.703: I/ActivityManager(580): Start proc com.jemsn.android for activity com.jemsn.android/.Logo: pid=29726 uid=10021 gids={3002, 3001, 1006, 1015, 3003, 1028}
06-21 17:53:04.803: E/Trace(29726): error opening trace file: No such file or directory (2)
06-21 17:53:04.943: W/dalvikvm(29726): threadid=1: thread exiting with uncaught exception (group=0x42096360)
06-21 17:53:04.943: E/AndroidRuntime(29726): FATAL EXCEPTION: main
06-21 17:53:04.943: E/AndroidRuntime(29726): java.lang.NoSuchMethodError: no static method with name='postMessage' signature='(III)V' in class Lcom/baidu/vi/VMsg;
06-21 17:53:04.943: E/AndroidRuntime(29726): at com.baidu.platform.comjni.engine.JNIEngine.InitEngine(Native Method)
06-21 17:53:04.943: E/AndroidRuntime(29726): at com.baidu.platform.comjni.engine.AppEngine.InitEngine(Unknown Source)
06-21 17:53:04.943: E/AndroidRuntime(29726): at com.baidu.platform.comapi.a.a(Unknown Source)
06-21 17:53:04.943: E/AndroidRuntime(29726): at com.baidu.mapapi.BMapManager.init(Unknown Source)
06-21 17:53:04.943: E/AndroidRuntime(29726): at com.jemsn.android.BMapApiDemoApp.onCreate(Unknown Source)
06-21 17:53:04.943: E/AndroidRuntime(29726): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
06-21 17:53:04.943: E/AndroidRuntime(29726): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4203)
06-21 17:53:04.943: E/AndroidRuntime(29726): at android.app.ActivityThread.access$1300(ActivityThread.java:136)
06-21 17:53:04.943: E/AndroidRuntime(29726): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
06-21 17:53:04.943: E/AndroidRuntime(29726): at android.os.Handler.dispatchMessage(Handler.java:99)
06-21 17:53:04.943: E/AndroidRuntime(29726): at android.os.Looper.loop(Looper.java:137)
06-21 17:53:04.943: E/AndroidRuntime(29726): at android.app.ActivityThread.main(ActivityThread.java:4797)
06-21 17:53:04.943: E/AndroidRuntime(29726): at java.lang.reflect.Method.invokeNative(Native Method)
06-21 17:53:04.943: E/AndroidRuntime(29726): at java.lang.reflect.Method.invoke(Method.java:511)
06-21 17:53:04.943: E/AndroidRuntime(29726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
06-21 17:53:04.943: E/AndroidRuntime(29726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
06-21 17:53:04.943: E/AndroidRuntime(29726): at dalvik.system.NativeStart.main(Native Method)
06-21 17:53:04.943: W/ActivityManager(580): Force finishing activity com.jemsn.android/.Logo
06-21 17:53:05.073: I/ActivityManager(580): Process com.jemsn.android (pid 29726) has died.
06-21 17:53:05.103: W/InputMethodManagerService(580): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42ec19e0 attribute=null