RoboGuice – Pitfall – RuntimeException on Activities

Last weekend, I started developing a application to sync OpenStreetMap contacts into my Android devices.

Wanting to avoid boilerplate code, and to experiment a little with Dependency Injection in Android, i based my work on RoboGuice. I think I followed all the example code, but my activities would simply crash with a RuntimeException on startup.

Since finding the root cause of this problem was not as trivial as I wished it to be, I decided to write this up as an article for myself and of course for all the other Android developers out there who don’t want to waste time hunting this issue when they could be gold-plating their apps :-)

To cut to the core of the problem: If your activity is throwing this:

E/AndroidRuntime( 246): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 246): java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.gurkensalat.osm.osmsync/com.gurkensalat.osm.osmsync.HelloAndroidActivity}: java.lang.ClassCastException:
E/AndroidRuntime( 246): at

maybe you need to declare your actual application class type in AndroidManifest.xml:

<application android:icon="@drawable/icon"

Maps Marker Pro Logo Error: a valid license key is needed to display maps properly!
Get directionsExport as KML for Google Earth/Google MapsOpen standalone map in fullscreen modeCreate QR code image for standalone map in fullscreen modeExport as GeoJSONExport as GeoRSSExport as ARML for Wikitude Augmented-Reality browser

loading map - please wait...

Home 48.129560, 11.348690 Pfarrer-Walleitner-Weg 22, Germering, Germany (Directions)
Maps Marker Pro Logo Error: a valid license key is needed to display maps properly!

All-New Nook – Reader with eInk display running Android

Using my Desire and S II to read books on lunch breaks can become pretty addictive :-)

The only bad thing is that reading on an eInk display can become pretty addictive as well, but my previous readers had either no wireless capability or an useless operating system.

So, one day while reading through my blogs, suddenly I stumbled on this little wonder device… smallish form factor, useful operating system and an eInk display… I was hooked from the first day on :-)

Actually ordering this thing and getting it to germany was a little adventure in itself, but in the end, I have a reader that is very close to my dream device… Now, if only Aldiko could synchronize its bookmarks between devices :-)


Samsung Galaxy S II – I want to read the display in the sun as well

For a very long time, I was satisfied with my HTC Desire

O.k., having to empty my email inbox every few days because the internal memory was way too little sucked. And installing a custom rom just so I could have a slightly more usable app2sd sucket a little bit more. But what really broke the camel’s back was the poor visibility of the display in the sun. Which meant that I could not read any ebooks while relaxing after lunch or go to a quick geocaching hunt just as the fancy hit me.

So, without futher ado, since many many other people already wrote everything necessary about this cool device, here is my second android device: