android 防止反编译
android 自带proguard 混淆器
配置如下
proguard.cfg 为配置 proguard的配置文件 在eclipse中建立项目会有的
-optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -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>; } -keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; }
然后在 build.xml 加入<property name="proguard-home" value="C:/proguard4.6/lib"/> 先下载proguard哦
这个样就行了
ant release
相关推荐
shinecjj 2015-06-13
learningITwell 2011-12-30
易辰Android 2011-11-13
mscn 2015-06-13
LXLYHM 2013-12-12
zyygive 2019-12-30
易辰Android 2012-04-20
RickyLee 2015-01-02
yuyu00 2019-06-29
知其然知其所以然 2012-08-10
afa0 2019-06-21
mlsnatalie 2018-03-15
zyygive 2017-01-03
蓝天梦 2015-09-06
tdltdltdl 2015-08-14
wolfoxkao 2013-10-28
NatureDay 2013-07-21