我想看看 Proguard 在 Debug 构建中的作用。这是我使用 Android Studio 的 build.gradle。
buildTypes {
debug {
minifyEnabled true
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
}
}
我的构建失败,我得到这个输出:
:proguardDebug
Warning: JavaAPI.CavvPreAuth: can't find referenced class sun.misc.BASE64Decoder
Warning: JavaAPI.CavvPreAuth: can't find referenced class sun.misc.BASE64Decoder
Warning: JavaAPI.CavvPreAuth: can't find referenced class sun.misc.BASE64Decoder
Warning: JavaAPI.CavvPurchase: can't find referenced class sun.misc.BASE64Decoder
Warning: JavaAPI.CavvPurchase: can't find referenced class sun.misc.BASE64Decoder
Warning: JavaAPI.CavvPurchase: can't find referenced class sun.misc.BASE64Decoder
Warning: there were 6 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)
:proguardDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':proguardDebug'.
> java.io.IOException: Please correct the above warnings first.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
有任何想法吗?