I found here to fix this with ignoring it with:-keep class org.apache.http.** { *; }-dontwarn org.apache.http.**-keep class android.net.http.** { *; }-dontwarn android.net.http.**我看不到从使用的库中删除重复项的方法.即使在使用 dontwarn 之后,警告也不会消失.I do not see a way to remove the duplicates from the used libraries. Even after using dontwarn the warnings do not vanish.这是处理此警告的正确方法,只是忽略它还是会导致问题?推荐答案如果你添加一个 proguard 选项 -printconfiguration config.txt 你会看到 proguard 添加If you add a proguard option -printconfiguration config.txt you'll see proguard adds-libraryjars 'D:\tools\android\platforms\android-23\android.jar'-libraryjars 'D:\tools\android\platforms\android-23\android.jar'-libraryjars 'D:\tools\android\platforms\android-23\optional\org.apache.http.legacy.jar'-libraryjars 'D:\tools\android\platforms\android-23\optional\org.apache.http.legacy.jar'您的重复类(例如 SslError)同时出现在 android.jar 和 org.apache.http.legacy.jar 中your duplicated classes (e.g. SslError) are presented in both android.jar and org.apache.http.legacy.jar即使你没有 useLibrary 'org.apache.http.legacy',Proguard 也会添加第二个 jar这是描述问题的开放性错误.Proguard adds second jar even if you don't useLibrary 'org.apache.http.legacy'Here is an open bug describing the problem.所以现在我们对这个问题无能为力.直接忽略它:So now we can't do anything with the issue. Just ignore it:-dontnote android.net.http.*-dontnote org.apache.commons.codec.**-dontnote org.apache.http.**只要它们位于库 jar(实际上是手机的库)中,就不需要保留这些类.dontwarn 不起作用,因为它不是警告,而是注释.There is no need to keep the classes as long as they are located in library jar (phone's library actually).dontwarn doesn't work because it's not a warning, it's a note. 这篇关于ProGuard:库类的重复定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!