简体   繁体   中英

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. 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. You should check your configuration for typos. Note: there were 345 unkept descriptor classes in kept class members. You should consider explicitly keeping the mentioned classes (using '-keep'). ( http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass ) Note: there were 1 library classes explicitly being kept. 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. You should check if you need to specify additional program jars. ( http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass ) Warning: there were 11 unresolved references to classes or interfaces. 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 ) Warning: Exception while processing task java.io.IOException: Please correct the above warnings first. Thread(Tasks limiter_2): destruction

Task :app:transformClassesAndResourcesWithProguardForRelease FAILED

Here is my proGuard file

-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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM