我的 build.gradle 有 . . .
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
我能找到的每个 proguard-android.txt 文件(如 C:\Users\Gary\AppData\Local\Android\sdk\tools\proguard 中的那个)都包含以下内容:
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /tools/android-sdk-macosx/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# 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 *;
#}
这似乎是胡说八道,因为我可以找到的 AS 项目中没有 project.properties 文件。我唯一能看到在我的 .apk 中被更改的是本地名称,仅此而已。我应该把我的 proguard 参数放在哪里?谢谢,院长