callback/callback-android — Issue #23: Crash when using splash screen
Author: jan-pieter
Created: 2011-11-15 16:09:04+00:00
State: open

After the upgrade from PhoneGap 1.1.0 to 1.2.0 the application crashes. Stack trace:
```
ERROR/AndroidRuntime(9469): FATAL EXCEPTION: Thread-9
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.(Handler.java:121)
at android.webkit.WebView$PrivateHandler.(WebView.java:7341)
at android.webkit.WebView.(WebView.java:416)
at android.webkit.WebView.(WebView.java:967)
at android.webkit.WebView.(WebView.java:957)
at android.webkit.WebView.(WebView.java:948)
at com.phonegap.DroidGap.init(DroidGap.java:268)
at com.phonegap.DroidGap.loadUrlIntoView(DroidGap.java:381)
at com.phonegap.DroidGap.access$300(DroidGap.java:159)
at com.phonegap.DroidGap$3.run(DroidGap.java:537)
at java.lang.Thread.run(Thread.java:1102)
```
When I disable the splash screen the app doesn't crash. So
```
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 1000);
```
crashes and
```
super.loadUrl("file:///android_asset/www/index.html");
```
doesn't. I'm using a PNG-file as splash screen and it hasn't changed since moving from PhoneGap 1.1.0.