【发布时间】:2016-04-18 17:29:53
【问题描述】:
我正在尝试将Umweltzone Android application 更新到 SDK 23。因此,我将项目配置更改如下:
// Excerpt from Umweltzone/build.gradle
compileSdkVersion 23
// ...
compile "com.android.support:design:23.1.1"
当我构建 release 版本时,此版本失败并出现此错误(拖尾部分):
...
注意:有 3 个对未知类的引用。
您应该检查您的配置是否有拼写错误。
(http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)注意:有 2 个类试图使用 反射。
您应该考虑保留内部类属性 (使用'-keepattributes InnerClasses')。
(http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)注意:保留的类成员中有 100 个未保留的描述符类。 您应该考虑明确保留提到的类 (使用“-keep”)。
(http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass)注意:有 5 个未解析的对类的动态引用或 接口。
您应该检查是否需要指定其他程序 jar。
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)注意:通过以下方式访问类成员有 3 次 内省。
您应该考虑明确保留提到的类成员 (使用“-keep”或“-keepclassmembers”)。
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)警告:对库类成员有 1 个未解析的引用。
您可能需要更新库版本。
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)警告:处理任务时出现异常 java.io.IOException: Please 请先更正上述警告。
:Umweltzone:transformClassesAndResourcesWithProguardForRelease 失败FAILURE:构建失败并出现异常。
- 出了什么问题:任务 ':Umweltzone:transformClassesAndResourcesWithProguardForRelease' 执行失败。
> java.io.IOException: 请先更正上述警告。
发布版本确实适用于 SDK 22。可以在 here 找到 ProGuard 配置。完整的构建输出可以在 here 找到,因为由于长度限制,StackOverflow 不允许我在这里粘贴。
【问题讨论】:
标签: android android-6.0-marshmallow android-proguard