【发布时间】:2015-10-30 13:13:12
【问题描述】:
我一直在寻找 Proguard 教程或解释性配置文件,我找不到好的,这方面的页面非常少,而且没有简单的初学者解释/教程。
请指导我学习如何在 Android Studio 中使用 proguard 的教程。
还告诉我你是如何使用的? & 你的配置文件。
谢谢。
【问题讨论】:
标签: android android-studio proguard android-build android-proguard
我一直在寻找 Proguard 教程或解释性配置文件,我找不到好的,这方面的页面非常少,而且没有简单的初学者解释/教程。
请指导我学习如何在 Android Studio 中使用 proguard 的教程。
还告诉我你是如何使用的? & 你的配置文件。
谢谢。
【问题讨论】:
标签: android android-studio proguard android-build android-proguard
proguard的完整使用说明:this link
Android 和 Java 之间没有显着差异。您可以使用链接中的所有文档/示例。为简单起见,您只需要做两件事:
build.gradle
buildTypes {
release {
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
}
}...
proguard-android-optimize.txt放在目录下
#duplicate the contents of this file and remove the include of this
-keep public class * extends android.app.Service
...
【讨论】: