I am using android studio to build debug and release application.
When i build debug/release application
./gradlew assembleDebug
./gradlew assembleRelease
both build are created perfectly and run as well. Shows appropriate dialog box for debug or release
now i have added proguard details in build.gradle:
signingConfigs {
myConfig {
storeFile file("keystore.jks")
storePassword "abc123!"
keyAlias "androidreleasekey"
keyPassword "pqrs123!"
}
}
buildTypes {
release {
runProguard true
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
signingConfig signingConfigs.myConfig
}
}
productFlavors {
defaultFlavor {
proguardFile 'proguard-rules.txt'
}
}
Now it shows error in event log as
Warning: there were 7 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 2 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile the code.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
:Flash Sales:proguardDefaultFlavorRelease FAILED
If i turn the runProguard option to false then its running.
I have these questions:
1) is it ok to release apk with runProguard = false?
2) How to use dontwarn while creating release build?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…