At times eclipse behaves strange. I have not come across a similar issue in my environment. I also checked the compatibility of this code just by building with Android versions 1.6, 2.1, 2.2 and 3.0. I only have a v2.2 device, hence could not check any app beyond 2.2 version.
Let us approach this issue systematically, we could find the root cause:
1.Check if you are able to compile and upload any sample application provided with Android SDK. To start with use SDK v1.6. The ADK Main Board demo application can compile from Android v1.5 and above. If this is fine, I hope the environment is clean.
2.Take a backup of all the your applications from eclipse workspace. Delete the contents of workspace folder, restart eclipse and try Step 1
3.If you are able to compile the Android sample applications, try the demo code once again.
4.If this still does not solve your issue, try to install an older version of eclipse (I use Version: 3.5.2 on a Ubuntu 10.4 workstation). Configure eclipse with Android SDK and try again.