CacheWebView
CacheWebView copied to clipboard
初始化失败
Process: com.example.php.webviewdemo, PID: 26774
java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/Cache;
at ren.yale.android.cachewebviewlib.WebViewCacheInterceptor.initHttpClient(WebViewCacheInterceptor.java:90)
at ren.yale.android.cachewebviewlib.WebViewCacheInterceptor.
添加混淆配置试试:
#CacheWebview
-dontwarn ren.yale.android.cachewebviewlib.**
-keep class ren.yale.android.cachewebviewlib.**{*;}
#okhttp
-dontwarn okhttp3.**
-keep class okhttp3.**{*;}
#okio
-dontwarn okio.**
-keep class okio.**{*;}
我也是这样,添加混淆好像没效果
是不是okhttp包冲突了,我库里也用到okhttp了,如果是这个问题,可以在用exclude试试
添加okhttp的依赖 implementation 'com.squareup.okhttp3:okhttp:3.10.0'
我的天,这个依赖不加竟然无法初始化 添加okhttp的依赖 implementation 'com.squareup.okhttp3:okhttp:3.10.0'