ProGuard:库类的重复定义?
2022-08-31 12:04:25
我为我的 Android 项目运行了我的 ProGuard,并收到以下警告:
Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver]
Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory]
Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
Note: duplicate definition of library class [org.apache.http.params.HttpParams]
Note: duplicate definition of library class [android.net.http.SslCertificate$DName]
Note: duplicate definition of library class [android.net.http.SslError]
Note: duplicate definition of library class [android.net.http.SslCertificate]
Note: there were 7 duplicate class definitions.
我发现这里解决这个问题,忽略它:
-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**
-keep class android.net.http.** { *; }
-dontwarn android.net.http.**
我没有看到从使用的库中删除重复项的方法。即使使用警告后也不会消失。dontwarn
这是处理此警告的正确方法,只是忽略它还是可能导致问题?