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

10,382

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
Share:
10,382
user1318700
Author by

user1318700

Updated on July 01, 2022

Comments

  • user1318700
    user1318700 almost 2 years

    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 :)