我有一个 webview,我现在正在尝试在这个视图中加载 url,当我运行这个活动时,它会发出警告,并且在某个时候它会崩溃。
09-05 15:47:34.277: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:47:34.277: D/TilesManager(9057): new EGLContext from framework: 5c7252f0
09-05 15:47:34.277: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:47:34.277: D/GLWebViewState(9057): Reinit shader
09-05 15:47:34.284: D/GLWebViewState(9057): Reinit transferQueue
09-05 15:48:01.800: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:48:01.800: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:48:21.613: I/dalvikvm(9057): threadid=3: reacting to signal 3
09-05 15:48:21.652: I/dalvikvm(9057): Wrote stack traces to '/data/anr/traces.txt'
09-05 15:48:29.855: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:48:29.863: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:48:57.409: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:48:57.417: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:49:24.933: I/Choreographer(9057): Skipped 1623 frames! The application may be doing too much work on its main thread.
09-05 15:49:24.933: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:49:24.941: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:49:53.542: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:49:53.542: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:50:22.183: I/Choreographer(9057): Skipped 1688 frames! The application may be doing too much work on its main thread.
09-05 15:50:22.183: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:50:22.183: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:50:49.558: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:50:49.558: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:51:18.628: I/Choreographer(9057): Skipped 1714 frames! The application may be doing too much work on its main thread.
09-05 15:51:18.636: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:51:18.636: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:51:47.769: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:51:47.769: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:52:16.777: I/Choreographer(9057): Skipped 1711 frames! The application may be doing too much work on its main thread.
09-05 15:52:16.784: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:52:16.784: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:52:46.909: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:52:46.909: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
09-05 15:53:15.550: I/Choreographer(9057): Skipped 1688 frames! The application may be doing too much work on its main thread.
09-05 15:53:15.550: W/GLWebViewState(9057): WARNING, scale seems corrupted before update: 2.000000e-02
09-05 15:53:15.550: W/GLWebViewState(9057): WARNING, scale seems corrupted after update: 2.000000e-02
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<WebView
android:id="@+id/webView_links"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
/>
</LinearLayout>
mWebView = new WebView(this);
mWebView = (WebView) findViewById(R.id.webView_links);
PIC_WIDTH= mWebView.getRight()-mWebView.getLeft();
mWebView.setPadding(0, 0, 0, 0);
mWebView.setInitialScale(2);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setHorizontalScrollBarEnabled(false);
mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if(mCurrentUrl != null && url != null && url.equals(mCurrentUrl)) {
mWebView.goBack();
return true;
}
view.loadUrl(url);
mCurrentUrl = url;
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
//heading.setText(view.getTitle());
}
});
Log.i("----------------------------------",""+extras.getString("link_address"));
mWebView .loadUrl("http://www.alinadental.com/");