我有一个WebView
尝试加载这样的网页:的WebView无法加载网页
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web);
wv=(WebView)findViewById(R.id.webview);
WebSettings ws=wv.getSettings();
ws.setJavaScriptEnabled(true);
wv.loadUrl("http://pro39.blutechnologies.com/crimes.aspx");
}
我已经加入了互联网许可清单
<uses-permission android:name="android.permission.INTERNET"/>
但是web视图是空白的,它既不会抛出错误,也不会加载网页。我如何加载这样的网页,我只尝试加载本地html
文件,我想知道如果我必须做不同的事情。
您是否也能够在浏览器上查看该网址?我知道网址工作正常。 – Kedarnath
是的,我可以在浏览器中查看网址 – vamsiampolu
好的,你是在仿真器还是在真实设备中试用此代码? – Kedarnath