-injars bin\adpush_jar.jar
-outjars adpush_0330package_pro.jar
-libraryjars 'D:\資料\adt-bundle-windows-x86-20130219\sdk\platforms\android-17\android.jar'
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-optimizationpasses 5
-dontpreverify
-verbose
-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
-keepclasseswithmembers class * {
public (android.content.Context,android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public (android.content.Context,android.util.AttributeSet,int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keep class * extends android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keep public class com.ad.view.AdMain {
public static com.ad.view.AdMain getInstance(android.content.Context);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keepclasseswithmembers,allowshrinking class * {
native ;
}
以上是jar包裡的cfg裡的代碼
代碼混淆後出現 如下錯誤:
Proguard returned with error code 1. See console
[2015-06-30 17:12:30 - test6] java.io.IOException: Can't read D:\workspace\test6\libs\adpush.jar)
[2015-06-30 17:12:30 - test6] at proguard.InputReader.readInput(InputReader.java:230)
[2015-06-30 17:12:30 - test6] at proguard.InputReader.readInput(InputReader.java:200)
[2015-06-30 17:12:30 - test6] at proguard.InputReader.readInput(InputReader.java:178)
[2015-06-30 17:12:30 - test6] at proguard.InputReader.execute(InputReader.java:78)
[2015-06-30 17:12:30 - test6] at proguard.ProGuard.readInput(ProGuard.java:196)
[2015-06-30 17:12:30 - test6] at proguard.ProGuard.execute(ProGuard.java:78)
[2015-06-30 17:12:30 - test6] at proguard.ProGuard.main(ProGuard.java:492)
[2015-06-30 17:12:30 - test6] Caused by: java.io.IOException: Can't process class com/ad/control/y.class
[2015-06-30 17:12:30 - test6] at proguard.io.ClassReader.read(ClassReader.java:112)
[2015-06-30 17:12:30 - test6] at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
[2015-06-30 17:12:30 - test6] at proguard.io.JarReader.read(JarReader.java:65)
[2015-06-30 17:12:30 - test6] at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
[2015-06-30 17:12:30 - test6] at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
[2015-06-30 17:12:30 - test6] at proguard.InputReader.readInput(InputReader.java:226)
[2015-06-30 17:12:30 - test6] ... 6 more
[2015-06-30 17:12:30 - test6] Caused by: java.lang.RuntimeException
[2015-06-30 17:12:30 - test6] at proguard.classfile.io.RuntimeDataInput.readUnsignedShort(RuntimeDataInput.java:196)
[2015-06-30 17:12:30 - test6] at proguard.classfile.io.ProgramClassReader.visitFullFrame(ProgramClassReader.java:655)
[2015-06-30 17:12:30 - test6] at proguard.classfile.attribute.preverification.FullFrame.accept(FullFrame.java:114)
[2015-06-30 17:12:30 - test6] at proguard.classfile.io.ProgramClassReader.visitStackMapTableAttribute(ProgramClassReader.java:452)
[2015-06-30 17:12:30 - test6] at proguard.classfile.attribute.preverification.StackMapTableAttribute.accept(StackMapTableAttribute.java:71)
[2015-06-30 17:12:30 - test6] at proguard.classfile.io.ProgramClassReader.visitCodeAttribute(ProgramClassReader.java:422)
[2015-06-30 17:12:30 - test6] at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
[2015-06-30 17:12:30 - test6] at proguard.classfile.io.ProgramClassReader.visitProgramMethod(ProgramClassReader.java:200)
[2015-06-30 17:12:30 - test6] at proguard.classfile.io.ProgramClassReader.visitProgramClass(ProgramClassReader.java:142)
[2015-06-30 17:12:30 - test6] at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
[2015-06-30 17:12:30 - test6] at proguard.io.ClassReader.read(ClassReader.java:91)
[2015-06-30 17:12:30 - test6] ... 11 more
把-optimizationpasses 5 改成-optimizationpasses 1或2 ,超過2次,會報錯