无法将URL加载到WebView

时间:2016-06-25 05:40:15

标签: android android-webview

我收到错误

  

(错误未知类型0xb9479ebc(glSizeof,73))

public class MainActivity extends ActionBarActivity {
WebView wv;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        wv=(WebView) findViewById(R.id.webView1);
        loadWebViewLoad(wv);
    }
    private void loadWebViewLoad(WebView webview) {
        webview.getSettings().setJavaScriptEnabled(true);
        webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
        webview.getSettings().setSupportMultipleWindows(true);
        webview.setWebViewClient(new WebViewClient());
        webview.setWebChromeClient(new WebChromeClient());
        webview.loadUrl("www.avengerstechnosoft.com");
    }

}

1 个答案:

答案 0 :(得分:-1)

您是否已将网络权限添加到mainifest.xml中。 尝试添加权限: android.permission.ACCESS_NETWORK_STATE