Android Studio 混淆打包 IOException: Please correct the above warnings first

来源:互联网 发布:ios图片模糊软件 编辑:程序博客网 时间:2024/06/10 01:58
Android studio 混淆打包时,出现Error:Execution failed for task ':app:proguardRelease'.

> java.io.IOException: Please correct the above warnings first.


Warning:org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.LogFactoryWarning:org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.LogWarning:org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.LogFactoryWarning:org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.LogWarning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.LogFactoryWarning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.LogWarning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.LogFactoryWarning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.LogWarning:org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager$1: can't find referenced class org.apache.commons.logging.LogWarning:there were 210 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:there were 1 unresolved references to library class members.         You probably need to update the library versions.         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember):app:proguardRelease FAILEDError:Execution failed for task ':app:proguardRelease'.> java.io.IOException: Please correct the above warnings first.

依照以往的管理,warn将其忽略就好了。但是现在不能忽略,影响打包的正常进行。

在官网找到这么一句话,Manual -> Troubleshooting -> “Warning: can’t find referenced class”,“try your luck with the -ignorewarnings option, or even the -dontwarn option”。

打开proguard-rules.txt,加入-dontwarn org.apache.http.**即可。

重新执行Generate Signed APK,打包成功!

2 0
原创粉丝点击