我已经创建了我的应用程序并按照此处的建议完成了此操作:
在 proguard-project.txt 中:
# 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 *;
#}
-optimizationpasses 10
-dontwarn android.support.**
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class ClassOne extends Activity
-keep public class ClassTwo extends ListActivity
-keep public class ClassThree extends ListActivity
-keep public class ClassFour extends ListActivity
-keep public class ClassFive extends ListActivity
-keep public class ClassSix extends ListActivity
-keep public class ClassSeven extends Activity
这些是我的课manifest
在 project.properties 中取消注释该行:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
我已经导出了我的应用程序并打开了使用过的 dex2jar 和 jd-gui 以查看是否添加成功。
问题是代码几乎和我写的一样,而且很容易理解。
难道我做错了什么?我可以改善混淆吗?