当我尝试为我的应用程序生成发布版本时,出现以下错误:
Error:Execution failed for task ':app:proguardRelease'. java.io.IOException: Please correct the above warnings first. Blockquote
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)
如何强制 Android Studio Gradle 插件 使用 -dontwarn
选项?
最佳答案
发生这种情况是因为发布版本正在使用 Proguard
。您需要在 proguard-rules.pro
中为您正在使用的某些依赖项添加 Proguard
规则。大多数库提供所需的 Proguard
规则;查看他们的 README
页面。
关于android - Gradle 问题 - 您可能需要添加缺少的库 jar 或更新它们的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29954434/