我试图加载此页面:http://festify.us/549f4d03493853f421cca45c
在我的Web视图中,但是我的应用程序崩溃并发送此错误:
05-09 04:14:03.989 10208-10234/dw5.djbronzinho A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 10234 (WebViewCoreThre)
研究认为可以使用WebChromeClient完成,但是我不能将其放入代码中,有人可以帮助我吗?
MainActive.java:
package dw5.djbronzinho;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Window;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity { private WebView mWebView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
mWebView = new WebView(this);
mWebView.loadUrl("http://festify.us/549f4d03493853f421cca45c/");
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
this.setContentView(mWebView);
}
@Override
public boolean onKeyDown(final int keyCode, final KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
mWebView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}}`
我的完整日志:
05-09 15:39:15.661 3286-3286/? D/dalvikvm﹕ Late-enabling CheckJNI05-09 15:39:15.831 3286-3286/dw5.djbronzinho D/ActivityThread﹕ setTargetHeapUtilization:0.2505-09 15:39:15.831 3286-3286/dw5.djbronzinho D/ActivityThread﹕ setTargetHeapIdealFree:838860805-09 15:39:15.831 3286-3286/dw5.djbronzinho D/ActivityThread﹕ setTargetHeapConcurrentStart:209715205-09 15:39:16.701 3286-3286/dw5.djbronzinho I/webclipboard﹕ clipservice: android.sec.clipboard.ClipboardExManager@428f715005-09 15:39:16.971 3286-3286/dw5.djbronzinho D/WebView﹕ loadUrlImpl: called05-09 15:39:17.201 3286-3286/dw5.djbronzinho D/libEGL﹕ loaded /system/lib/egl/libEGL_adreno200.so05-09 15:39:17.291 3286-3286/dw5.djbronzinho D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_adreno200.so05-09 15:39:17.291 3286-3286/dw5.djbronzinho D/libEGL﹕ loaded /system/lib/egl/libGLESv2_adreno200.so05-09 15:39:17.311 3286-3286/dw5.djbronzinho I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:299>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.107_msm8625_JB_REL_2.0.3_CL3357771_release_AU (CL3357771) Build Date: 02/25/13 Mon Local Branch: Remote Branch: quic/jb_rel_2.0.3 Local Patches: NONE Reconstruct Branch: AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.107 + NOTHING05-09 15:39:17.511 3286-3318/dw5.djbronzinho V/webkit﹕ BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {428f3038}05-09 15:39:17.601 3286-3286/dw5.djbronzinho D/OpenGLRenderer﹕ Enabling debug mode 005-09 15:39:17.611 3286-3286/dw5.djbronzinho D/WebView﹕ onSizeChanged - w:480 h:76205-09 15:39:17.621 3286-3286/dw5.djbronzinho I/Choreographer﹕ Skipped 31 frames! The application may be doing too much work on its main thread.05-09 15:39:17.641 3286-3318/dw5.djbronzinho D/webcore﹕ CORE loadUrl: called05-09 15:39:17.641 3286-3318/dw5.djbronzinho D/webkit﹕ Firewall not null05-09 15:39:17.641 3286-3318/dw5.djbronzinho D/webkit﹕ euler: isUrlBlocked = false05-09 15:39:21.081 3286-3286/dw5.djbronzinho D/TilesManager﹕ new EGLContext from framework: 4f83efb005-09 15:39:21.081 3286-3286/dw5.djbronzinho D/GLWebViewState﹕ Reinit shader05-09 15:39:21.361 3286-3286/dw5.djbronzinho D/GLWebViewState﹕ Reinit transferQueue05-09 15:39:26.611 3286-3318/dw5.djbronzinho A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 3318 (WebViewCoreThre)
AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
最佳答案
这不是答案,但是This可以帮助您在chrome的开发工具中调试网站时调试webview。