我正在尝试生成签名的 APK,但出现以下错误:
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: proguard.ParseException: Expecting separator ';' before '(' in line 90 of file '/Users/OSX/Desktop/PROJECT/12345/name/app/build/intermediates/proguard-rules/release/aapt_rules.txt'
我浏览了 aapt_rules.txt,这是文件的第 90 行:
# onClick res/layout/content_main.xml #generated:15
-keepclassmembers class * { *** getBitData (MainActivity)(...); }
这是我在 gradle 中的 buildTypes:
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}