I am trying to enable minifying in an Android app using ProGuard.
When I set minifyEnabled
to false
it builds but as soon as I set it to true
:
buildTypes {
debug {
minifyEnabled false
jniDebuggable true
versionNameSuffix '_DEBUG'
zipAlignEnabled true
}
release {
minifyEnabled true
proguardFile getDefaultDexGuardFile('dexguard-release.pro')
proguardFile 'dexguard-project.txt'
jniDebuggable false
signingConfig signingConfigs.release
}
I get a gradle syncing error:
ERROR: minifyEnabled is set to 'true' for variant <name of the variant>.
And stacktrace states:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':MainApp'
Caused by: org.gradle.api.GradleException: Errors occurred during DexGuard plugin configuration.
What does DexGuard have to do here?
question from:
https://stackoverflow.com/questions/65598419/dexguard-error-while-trying-to-enable-minifying-in-proguard 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…