Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.SafeBrowsingResponse"

Tags:

android

I'm using WebView in my app while loading content warning logs is coming from logcat like below

 Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.SafeBrowsingResponse" on path: DexPathList[[zip file "/data/app/com.android.chrome-1/base.apk"],nativeLibraryDirectories=[/data/app/com.android.chrome-1/lib/arm, /data/app/com.android.chrome-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]  

After That app crash again and again

04-25 09:46:49.219 26505-26505/com.abc W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
04-25 09:46:49.219 26505-26505/com.abc W/google-breakpad: Chrome build fingerprint:
04-25 09:46:49.219 26505-26505/com.abc W/google-breakpad: 5.0.7lab
04-25 09:46:49.219 26505-26505/com.abc W/google-breakpad: 58
04-25 09:46:49.219 26505-26505/com.abc W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
04-25 09:46:49.219 26505-26505/com.whence A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xca480db0 in tid 26505 (com.whence)

                                                  [ 04-25 09:46:49.219   469:  469 W/         ]
                                                  debuggerd: handling request: pid=26505 uid=10314 gid=10314 tid=26505
like image 461
Surya Prakash Kushawah Avatar asked Apr 25 '18 04:04

Surya Prakash Kushawah


1 Answers

Solution for the problem is:

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        view.getSettings().setSafeBrowsingEnabled(false);
    }

    WebSettings settings = view.getSettings();
    settings.setJavaScriptEnabled(true);

Let me know if this doesn't work for you.

like image 193
Niki Izvorski Avatar answered Sep 27 '22 19:09

Niki Izvorski