Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid WebView stopped unexpectly after loading an url
    primarykey
    data
    text
    <p>i have a big problem and i did not find a solution for my problem. </p> <p>I try to load an url and i use this tutorial: <a href="http://developer.android.com/reference/android/webkit/WebView.html" rel="nofollow noreferrer">http://developer.android.com/reference/android/webkit/WebView.html</a></p> <p><strong>My Code:</strong></p> <pre><code>public class HomeView extends Activity { WebView mWebView; public void onCreate(Bundle savedInstanceState) { try { super.onCreate(savedInstanceState); setContentView(R.layout.home); mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl("http://www.google.de"); } catch (Exception e) { } } } </code></pre> <p><strong>my home.xml:</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /&gt; </code></pre> <p>Now my problem. If i start the program everything works fine. The page is loading and i see it on the screen. but then after everything is loaded, i get the following message (the application has stopped unexpectedly. please try again.) and my programm is terminated.</p> <p>Hope somebody can help me.</p> <p>Cheers, Roland</p> <p><strong>My Log:</strong></p> <pre><code>09-16 12:59:14.154: WARN/cache(1204): Unable to create webviewCache directory 09-16 12:59:18.432: DEBUG/dalvikvm(1204): GC_FOR_MALLOC freed 1931 objects / 221256 bytes in 195ms 09-16 12:59:18.522: WARN/dalvikvm(1204): threadid=13: thread exiting with uncaught exception (group=0x4001d800) 09-16 12:59:18.632: ERROR/AndroidRuntime(1204): FATAL EXCEPTION: WebViewWorkerThread 09-16 12:59:18.632: ERROR/AndroidRuntime(1204): java.lang.NullPointerException 09-16 12:59:18.632: ERROR/AndroidRuntime(1204): at android.webkit.WebViewDatabase.getCacheTotalSize(WebViewDatabase.java:734) 09-16 12:59:18.632: ERROR/AndroidRuntime(1204): at android.webkit.CacheManager.trimCacheIfNeeded(CacheManager.java:548) 09-16 12:59:18.632: ERROR/AndroidRuntime(1204): at android.webkit.WebViewWorker.handleMessage(WebViewWorker.java:190) 09-16 12:59:18.632: ERROR/AndroidRuntime(1204): at android.os.Handler.dispatchMessage(Handler.java:99) 09-16 12:59:18.632: ERROR/AndroidRuntime(1204): at android.os.Looper.loop(Looper.java:123) 09-16 12:59:18.632: ERROR/AndroidRuntime(1204): at android.os.HandlerThread.run(HandlerThread.java:60) 09-16 12:59:18.712: WARN/ActivityManager(65): Force finishing activity de.test.webview/.HomeView 09-16 12:59:19.283: WARN/InputManagerService(65): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@43ecba70 (uid=10035 pid=1204) 09-16 12:59:21.976: DEBUG/dalvikvm(263): GC_EXPLICIT freed 65 objects / 2968 bytes in 4365ms 09-16 13:00:39.013: DEBUG/SntpClient(65): request time failed: java.net.SocketException: Address family not supported by protocol 09-16 13:04:19.383: INFO/Process(1204): Sending signal. PID: 1204 SIG: 9 09-16 13:04:19.474: WARN/InputManagerService(65): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43e92c50 09-16 13:04:19.742: INFO/ActivityManager(65): Process de.test.webview (pid 1204) has died. </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload