android百度地圖打包混淆 用不了No such file or directory (2) com.baidu.mapapi.BMapManager.init(Unknown Source)

來源:互聯網
上載者:User

調用了百度地圖地圖開發包是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 213306-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: main06-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/.Logo06-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=null06-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 213306-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: main06-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/.Logo06-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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.