Webview not able to load https url in android?

前端 未结 9 1286
别跟我提以往
别跟我提以往 2020-12-29 08:14

I am implementing webview application in android. When i am trying to load https url one or two times it finishes the activity. Agian tryin

相关标签:
9条回答
  • 2020-12-29 08:19

    Add internet settings in your manifest.xml

    <uses-permission android:name="android.permission.INTERNET" />
    

    and check can you access internet on your device.

    0 讨论(0)
  • 2020-12-29 08:24

    Add your manifest file

    <uses-permission android:name="android.permission.INTERNET" />
    

    When ever you accessing web content need to get internet permission then only it will load.

    0 讨论(0)
  • 2020-12-29 08:29

    You should remove this

    super.OnReceiveSslError(view,handler,error);
    
    0 讨论(0)
  • 2020-12-29 08:37

    December 2016 answer:

    If this happens only on certain devices with Android 5+ and only on certain pages, it's most likely due to this chromium bug:

    https://www.chromium.org/developers/androidwebview/webview-ct-bug

    The solution is to either:

    • tell customers to update webview to 55+ (might not be easy on all devices)
    • tell customers to move their system clock backward a few weeks (not a nice solution)
    • get a non-Symantec cert
    0 讨论(0)
  • 2020-12-29 08:41

    Try this

     WebView webview = (WebView)findViewById(R.id.webView); 
        Webview.setBackgroundColor(0);
        webview.getSettings().setJavaScriptEnabled(true); 
        webview.loadUrl("https://www.facebook.com");
        webview.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
    
    0 讨论(0)
  • 2020-12-29 08:42

    Try to use below attributes :

            webView = (WebView) findViewById(R.id.webView1);
            WebSettings settings = webView.getSettings();
            settings.setJavaScriptEnabled(true);
            settings.setDomStorageEnabled(true);
    
    0 讨论(0)
提交回复
热议问题