真个的防止反编译

真正的防止反编译
1.android环境要求:adt20.0.3;eclipse为能装adt20.0.3的eclipse,我用的eclipse-java-3.7.2;android系统4.0.3
2.用eclipse新建 一个android项目,会看到根目录下有proguard-project.txt和project.properties,在project.properties有这样一句话:proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
将这行代码放开,也就是说把这行代码最前面的"#"去掉
3.将使用的jar包放到libs文件夹中,仿佛必须以libs命名
注:1.使用gson jar包的同志注意了,需要在proguard-project.txt加上下面的代码
##---------------Begin: proguard configuration for Gson  ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }

# Application classes that will be serialized/deserialized over Gson
-keep class com.hanweb.pertool.android.data.entity.ResEntity{ *; }
-keep class com.hanweb.pertool.android.data.entity.ResSortEntity{ *; }

##---------------End: proguard configuration for Gson  ----------
红色字体表示换成你在项目中使用使用到的(和gson相关的即使用Type)实体全名