While working through chapter two's example todo list app I ran into some unexpected issues. Upon start the application would crash. This occured before a single item was drawn on the screen.

At first I thought that it was possibly an error with how I configured the AVD. So I created a second AVD, this time with target platform 2.1 (instead of 2.3.3), and re-ran the program. Same problem. Now I have to dig deeper.

I know that the Java code and xml is an exact match to the book and could not find any reports of issues with the implementation. The next step is to figure out how to trace what happens in the emulator beyond the "Force Quit" dialog box.

Eventually I found an excellent tutorial online walking me through basic Android development, including debugging, at Build Mobile. Here I was introduced to LogCat, an awesome resource for wathcing the details of the emulation. LogCat is part of the Android Developer Tools (ADT) plugin for Eclipse and I highly recommend leaving this view open while testing applications.

After reviewing the output from LogCat I found this message: 06-04 12:14:53.664: ERROR/AndroidRuntime(229): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.paad.todolist/com.paad.todolist.Todo}: java.lang.ClassNotFoundException: com.paad.todolist.Todo in loader dalvik.system.PathClassLoader@44c06810

This error was key to solving my issue. Once I read this message I knew that my class extending activity was not matching up with what the emulator was expecting to find. The emulator uses a value stored in the manifest to look for the correct class. Changing this value allowed the program to run smoothly. Next time this will be the first thing I look for before attempting to run an application.