构建签名APK Android时出现Proguard错误

问题描述 投票:0回答:1

我正在尝试从Android工作室构建签名APK,但我得到这个错误。当我在设备上正常运行应用程序它工作文件也工作正常,当我生成调试模式apk。请提出可能存在的问题。谢谢

错误 (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)注意:有1个未知类成员的引用。您应该检查您的配置是否有拼写错误。注意:保留类成员中有345个unkept描述符类。您应该考虑明确保留所提到的类(使用'-keep')。 (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass)注意:明确保留了1个库类。您不需要保留库类;它们已经保持不变。 (http://proguard.sourceforge.net/manual/troubleshooting.html#libraryclass)注意:有44个未解决的类或接口动态引用。您应该检查是否需要指定其他程序罐。 (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)警告:有11个未解决的类或接口引用。您可能需要添加缺少的库jar或更新其版本。如果您的代码在没有缺少类的情况下正常工作,则可以使用“-dontwarn”选项来禁止警告。 (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)警告:处理任务java.io.IOException时出现异常:请先纠正上述警告。线程(任务限制器_2):销毁

任务:app:transformClassesAndResourcesWithProguardForRelease FAILED

这是我的proGuard文件

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-flattenpackagehierarchy

-allowaccessmodification
-optimizations !code/simplification/arithmetic
-keepattributes *Annotation*

-assumenosideeffects class android.util.Log {
    public static *** d(...);
    public static *** v(...);
}

-dontwarn butterknife.internal.**
-dontwarn retrofit2.Platform$Java8
-dontwarn com.squareup.okhttp.**
-dontwarn com.google.auto.value.**
-dontwarn javax.annotation.**
-dontwarn okio.**
android exception proguard signed
1个回答
1
投票

解决方案我找到了它的解决方案,只是添加,它很好。

-ignorewarnings
© www.soinside.com 2019 - 2024. All rights reserved.