当前位置:编程学习 > wap >>

android 混淆 找不到 第三方类

内容如下:

-optimizationpasses 5

-dontusemixedcaseclassnames

-dontskipnonpubliclibraryclasses

-dontpreverify

#-ignorewarnings 

-verbose

-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-libraryjars lib/mina-core-2.0.4.jar

-libraryjars lib/slf4j-android-1.5.8.jar

-libraryjars lib/baidumapapi.jar

-libraryjars libs/Msc.jar

-libraryjars lib/activation.jar

-libraryjars lib/additionnal.jar

-libraryjars lib/mail.jar

-keep public class * extends android.app.Activity

-keep public class * extends android.app.Application

-keep public class * extends android.app.Service

-keep public class * extends android.content.BroadcastReceiver

-keep public class * extends android.content.ContentProvider

-keep public class * extends android.app.backup.BackupAgentHelper

-keep public class * extends android.preference.Preference

-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {

    native <methods>;

}

-keepclasseswithmembers class * {

    public <init>(android.content.Context, android.util.AttributeSet);

}

-keepclasseswithmembers class * {

    public <init>(android.content.Context, android.util.AttributeSet, int);

}

-keepclassmembers class * extends android.app.Activity {

   public void *(android.view.View);

}

-keepclassmembers enum * {

    public static **[] values();

    public static ** valueOf(java.lang.String);

}

-keep class * implements android.os.Parcelable {

  public static final android.os.Parcelable$Creator *;

}

-keep class com.baidu.mapapi.** {*;}

-keep class org.slf4j.** {*;}

-keep class org.apache.mina.core.** {*;}

-keep class com.iflytek.** {*;}

-keep class com.sun.activeation.registries.** {*;}

-keep class javax.activation.** {*;}

运行出错信息:

10-24 17:27:35.718: D/ActivityThread(6633): test selfappwidget  getPackageInfo,packageInfo 111,b=true
10-24 17:27:35.718: D/ActivityThread(6633): test selfappwidget  handleBindApplication,packageInfo 000=android.app.LoadedApk@405153d8
10-24 17:27:35.812: E/dalvikvm(6633): Could not find class 'com.baidu.mapapi.BMapManager', referenced from method com.driver.client.MyApplication.onCreate
10-24 17:27:35.812: W/dalvikvm(6633): VFY: unable to resolve new-instance 179 (Lcom/baidu/mapapi/BMapManager;) in Lcom/driver/client/MyApplication;
10-24 17:27:35.812: D/dalvikvm(6633): VFY: replacing opcode 0x22 at 0x0009
10-24 17:27:35.812: D/dalvikvm(6633): VFY: dead code 0x000b-002d in Lcom/driver/client/MyApplication;.onCreate ()V
10-24 17:27:35.820: I/dalvikvm(6633): Could not find method com.baidu.mapapi.BMapManager.destroy, referenced from method com.driver.client.MyApplication.onTerminate
10-24 17:27:35.828: W/dalvikvm(6633): VFY: unable to resolve virtual method 545: Lcom/baidu/mapapi/BMapManager;.destroy ()V
10-24 17:27:35.828: D/dalvikvm(6633): VFY: replacing opcode 0x6e at 0x000d
10-24 17:27:35.828: D/dalvikvm(6633): VFY: dead code 0x0010-0012 in Lcom/driver/client/MyApplication;.onTerminate ()V
10-24 17:27:35.828: I/MyApplication(6633): MyApplication created
10-24 17:27:35.828: D/AndroidRuntime(6633): Shutting down VM
10-24 17:27:35.828: W/dalvikvm(6633): threadid=1: thread exiting with uncaught exception (group=0x40015560)
10-24 17:27:35.843: E/AndroidRuntime(6633): FATAL EXCEPTION: main
10-24 17:27:35.843: E/AndroidRuntime(6633): java.lang.NoClassDefFoundError: com.baidu.mapapi.BMapManager
10-24 17:27:35.843: E/AndroidRuntime(6633):  at com.driver.client.MyApplication.onCreate(Unknown Source)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3398)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at android.app.ActivityThread.access$2200(ActivityThread.java:117)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:969)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at android.os.Handler.dispatchMessage(Handler.java:99)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at android.os.Looper.loop(Looper.java:130)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at android.app.ActivityThread.main(ActivityThread.java:3809)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at java.lang.reflect.Method.invokeNative(Native Method)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at java.lang.reflect.Method.invoke(Method.java:507)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
10-24 17:27:35.843: E/AndroidRuntime(6633):  at dalvik.system.NativeStart.main(Native Method)

--------------------编程问答-------------------- 第三方的不混淆不就行了么
补充:移动开发 ,  Android
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,