apk反编译(7)用ProGuard混淆代码,初级防止反编译

eclipse为例

1,project.properties去掉 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 前面的注释

 # This file is automatically generated by Android Tools.
 # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
 #
 # This file must be checked in Version Control Systems.
 #
 # To customize properties used by the Ant build system edit
 # "ant.properties", and override values to adapt the script to your
 # project structure.
 #
 # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

 # Project target.
 target=android-22
 proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

2,在proguard-project.txt中配置混淆规则,没有则全部混淆。

 # To enable ProGuard in your project, edit project.properties
 # to define the proguard.config property as described in that file.
 #
 # Add project specific ProGuard rules here.
 # By default, the flags in this file are appended to flags specified
 # in ${sdk.dir}/tools/proguard/proguard-android.txt
 # You can edit the include path and order by changing the ProGuard
 # include property in project.properties.
 #
 # For more details, see
 #   http://developer.android.com/guide/developing/tools/proguard.html

 # Add any project specific keep options here:

 # If your project uses WebView with JS, uncomment the following
 # and specify the fully qualified class name to the JavaScript interface
 # class:
 #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
 #   public *;
 #}
上一篇:使用中oracle和mysql的一些不同点


下一篇:tomcat 部署war项目