proguard warning library class android.webkit.WebView depends on program class android.webkit.WebViewClien

user1318700 picture user1318700 · Apr 7, 2012 · Viewed 10.2k times · Source

I have a version of file android.webkit.WebViewClient in my application source directory in order to handle onReceivedSslError in my own extended version of WebViewClient. When I use the new ProGuard integration in sdk-7 I get the following warning:

[proguard] Warning: library class android.webkit.WebView depends on program class android.webkit.WebViewClient

...

 [proguard] Warning: there were 1 instances of library classes depending on program classes.
 [proguard]          You must avoid such dependencies, since the program classes will
 [proguard]          be processed, while the library classes will remain unchanged.

Can anyone tell me how to fix this in my proguard.cfg? Thanks :)

Answer

cox picture cox · Nov 6, 2012

I encountered the same problem, and by hint of above, I write these lines into proguard.cfg and the problem gets solved:

-keep public class android.net.http.SslError
-keep public class android.webkit.WebViewClient

-dontwarn android.webkit.WebView
-dontwarn android.net.http.SslError
-dontwarn android.webkit.WebViewClient