[英]Proguard Error while building signed APK Android
I am trying to build signed APK from android studio but i get this error.When I run the app normally on device it work file also it work fine when i generate debug mode apk. 我正在尝试从android studio构建签名的APK,但出现此错误。当我在设备上正常运行该应用程序时,它的工作文件在我生成调试模式apk时也可以正常工作。 Please suggest what can be possible issue with it.
请提出可能的问题。 Thanks
谢谢
Error 错误
( http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass ) Note: there were 1 references to unknown class members. ( http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass )注意:有1个对未知类成员的引用。 You should check your configuration for typos.
您应该检查配置是否有错字。 Note: there were 345 unkept descriptor classes in kept class members.
注意:保留的类成员中有345个未定义的描述符类。 You should consider explicitly keeping the mentioned classes (using '-keep').
您应该考虑显式地保留提及的类(使用'-keep')。 ( http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass ) Note: there were 1 library classes explicitly being kept.
( http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass )注意:明确保留了1个库类。 You don't need to keep library classes;
您不需要保留库类。 they are already left unchanged.
他们已经保持不变。 ( http://proguard.sourceforge.net/manual/troubleshooting.html#libraryclass ) Note: there were 44 unresolved dynamic references to classes or interfaces.
( http://proguard.sourceforge.net/manual/troubleshooting.html#libraryclass )注意:有44个未解决的对类或接口的动态引用。 You should check if you need to specify additional program jars.
您应该检查是否需要指定其他程序jar。 ( http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass ) Warning: there were 11 unresolved references to classes or interfaces.
( http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass )警告:有11个未解决的对类或接口的引用。 You may need to add missing library jars or update their versions.
您可能需要添加缺少的库jar或更新其版本。 If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options.
如果您的代码可以正常运行而没有缺少类,则可以使用“ -dontwarn”选项禁止显示警告。 ( http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass ) Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
( http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass )警告:处理任务java.io.IOException时发生异常:请首先更正以上警告。 Thread(Tasks limiter_2): destruction
线程(任务限制器_2):破坏
Task :app:transformClassesAndResourcesWithProguardForRelease FAILED 任务:app:transformClassesAndResourcesWithProguardForRelease失败
Here is my proGuard file 这是我的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.**
解决方案我找到了解决方案,只需添加就可以了。
-ignorewarnings
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.