【问题标题】:Proguard Error while building signed APK Android构建签名APK Android时出现Proguard错误
【发布时间】:2019-07-14 02:19:24
【问题描述】:

我正在尝试从 android studio 构建签名的 APK,但出现此错误。当我在设备上正常运行应用程序时,它的工作文件也可以在我生成调试模式 apk 时正常工作。请提出可能的问题。 谢谢

错误
(http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass) 注意:有 1 处对未知班级成员的引用。 您应该检查您的配置是否有拼写错误。 注意:保留的类成员中有 345 个未保留的描述符类。 您应该考虑明确保留提到的类 (使用'-keep')。 (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass) 注意:明确保留了 1 个库类。 您不需要保留库类;它们已经保持不变。 (http://proguard.sourceforge.net/manual/troubleshooting.html#libraryclass) 注意:有 44 个未解析的对类或接口的动态引用。 您应该检查是否需要指定其他程序 jar。 (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】:

    解决方案 我找到了解决办法,刚刚加了就好了。

    -ignorewarnings
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-26
      • 1970-01-01
      • 2019-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多