1
我有一個html5的移動web應用程序,從瀏覽器加載好,但卡在android webview。我們在加載網絡應用程序之前使用了啓動畫面,並且我的webview卡在啓動畫面中,不加載主頁。我們使用wurfl api通過用戶代理來檢測設備,並確保用戶代理與瀏覽器和webview相同,因爲我們只使用「Android」和「3.9>」的操作系統名稱和版本。卡住了這個問題的最後兩天:Android的webview不會加載頁面,但從瀏覽器加載應用程序
String url = http://myapp.com
webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
progDailog = ProgressDialog.show(Activity.this, "Loading","Please wait...", true);
progDailog.setCancelable(false);
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
progDailog.show();
view.loadUrl(url);
return true;
}
@Override
public void onPageFinished(WebView view, final String url) {
progDailog.dismiss();
}
});
webView.loadUrl(url);
是我加入互聯網,無線許可的體現:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
獲取例外:
webview : blockWebkitViewMessage= false (on Samsung galaxy s3)
(Nexus 5)
W/AwContents(15767): nativeOnDraw failed; clearing to background color.
I/chromium(15767): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I/chromium(15767): [INFO:CONSOLE(2)] "Viewport argument key "minimal-ui" not recognized and ignored.", source:
Here is another thread i found but not a solution