0

I can not load web pages using webview,Nothing is displayed, this url "http://dev.51yunche.com:7000/WeChat/Service%20introduce.html", this is my webview

    webView = (WebView) findViewById(R.id.drive_web);
            webView.setWebViewClient(new WebViewClient());
            webview.getSettings().setJavaScriptEnabled(true);
            webView.getSettings().setAppCacheEnabled(true);
            webView.getSettings().setDomStorageEnabled(true);//DOM Storage
        webView.loadUrl("http://dev.51yunche.com:7000/WeChat/Service%20introduce.html");

this xml:

 <WebView
            android:id="@+id/drive_web"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            />

The console does not have any prompts or error messages。I'd like to hear some input from more experienced WebView users (and developers?).

Thank you in advance!

1
  • 1
    The Url link opens a blank page, that why nothing is shown Commented Apr 13, 2017 at 11:35

3 Answers 3

1

This is not webview Issue.In web browser also that url display Nothing.check that Backend or design code of your html file.

Sign up to request clarification or add additional context in comments.

Comments

1

You have a space encoded character %20 in your URL...

use a valid url like:

 webView.loadUrl("http://dev.51yunche.com:7000/WeChat/Serviceintroduce.html");

Alternatively you can also try URLEncoder.encode(YOUR_URL); function to encode the Url

Comments

0

Your link itself doesn't display anything in web browser. If you still have any doubt, just simply create a normal html page by yourself and run it from your local system and check it out.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.