标签:
# 通过指定数量的优化能执行 -optimizationpasses 5 # 混淆时不会产生形形色色的类名 -dontusemixedcaseclassnames # 指定不去忽略非公共的库类 -dontskipnonpubliclibraryclasses # 不预校验 -dontpreverify # 优化选项 -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -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 *; } #-------------------------- # 保护类型 -keepattributes 说明 # Exceptions, Signature, Deprecated, SourceFile, SourceDir, LineNumberTable, LocalVariableTable, # LocalVariableTypeTable, Synthetic, EnclosingMethod, RuntimeVisibleAnnotations, RuntimeInvisibleAnnotations, # RuntimeVisibleParameterAnnotations, RuntimeInvisibleParameterAnnotations, and AnnotationDefault # -------------------- -keepattributes ** -libraryjars <java.home>/lib/rt.jar #第三方类库 -dontwarn android.** -keep class android.** {*;} -dontwarn com.baidu.** -keep class com.baidu.** {*;} -dontwarn com.tencent.** -keep class com.tencent.** {*;} -dontwarn com.lidroid.** -keep class com.lidroid.** {*;} -dontwarn com.sina.** -keep class com.sina.** {*;} -dontwarn com.weibo.** -keep class com.weibo.** {*;} -dontwarn com.baidu.mapapi.** -keep class com.baidu.mapapi.** {*;} -dontwarn android.webkit.** -keep class android.webkit.**{*;} -dontwarn android.net.http.** -keep class android.net.http.** { *;} -libraryjars libs/android-support-v4.jar -dontwarn android.support.v4.** -keep class android.support.v4.** { *; } -keep interface android.support.v4.app.** { *; } # 删除Log代码 -assumenosideeffects class android.util.Log { public static *** v(...); public static *** i(...); public static *** d(...); public static *** w(...); public static *** e(...); }
错误,不知道为什么老是不行
java.lang.IllegalStateException: Could not remove /projectname/bin/res/crunch/drawable-hdpi/ic_launcher.png at org.tigris.subversion.subclipse.core.resourcesListeners.RevertResourceManager$RevertWorkspaceJob.revertResources(RevertResourceManager.java:65) at org.tigris.subversion.subclipse.core.resourcesListeners.RevertResourceManager$RevertWorkspaceJob.runInWorkspace(RevertResourceManager.java:85) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
标签:
原文地址:http://my.oschina.net/moziqi/blog/487181