I reinstalled the ADT Bundle, because I had some problems after updating eclipse.
Now I get the following exception, when I want to test my app:
06-05 10:33:35.770: E/AndroidRuntime(17751): FATAL EXCEPTION: main
06-05 10:33:35.770: E/AndroidRuntime(17751): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{foo.bar/foo.bar.TabsFragmentActivity}: java.lang.ClassNotFoundException: foo.bar.TabsFragmentActivity in loader dalvik.system.PathClassLoader[/data/app/foo.bar-2.apk]
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1670)
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.os.Handler.dispatchMessage(Handler.java:99)
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.os.Looper.loop(Looper.java:130)
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.app.ActivityThread.main(ActivityThread.java:3695)
06-05 10:33:35.770: E/AndroidRuntime(17751): at java.lang.reflect.Method.invokeNative(Native Method)
06-05 10:33:35.770: E/AndroidRuntime(17751): at java.lang.reflect.Method.invoke(Method.java:507)
06-05 10:33:35.770: E/AndroidRuntime(17751): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
06-05 10:33:35.770: E/AndroidRuntime(17751): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
06-05 10:33:35.770: E/AndroidRuntime(17751): at dalvik.system.NativeStart.main(Native Method)
06-05 10:33:35.770: E/AndroidRuntime(17751): Caused by: java.lang.ClassNotFoundException: foo.bar.TabsFragmentActivity in loader dalvik.system.PathClassLoader[/data/app/foo.bar-2.apk]
06-05 10:33:35.770: E/AndroidRuntime(17751): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
06-05 10:33:35.770: E/AndroidRuntime(17751): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
06-05 10:33:35.770: E/AndroidRuntime(17751): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-05 10:33:35.770: E/AndroidRuntime(17751): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
06-05 10:33:35.770: E/AndroidRuntime(17751): ... 11 more
Here's the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="foo.bar"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="foo.bar.ui.tabs.TabsFragmentActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="foo.bar.ui.activities.EditActivity"
android:parentActivityName="foo.bar.ui.tabs.TabsFragmentActivity"
android:windowSoftInputMode="stateHidden">
</activity>
<activity
android:name="foo.bar.ui.activities.LocationActivity"
android:label="Select a location"
android:parentActivityName="foo.bar.ui.tabs.TabsFragmentActivity" >
</activity>
<activity
android:name="foo.bar.ui.activities.DeleteLocationsActivity"
android:label="Delete locations"
android:parentActivityName="foo.bar.ui.activities.LocationActivity" >
</activity>
<activity
android:name="foo.bar.ui.activities.ShowLocationActivity"
android:parentActivityName="foo.bar.ui.activities.LocationActivity" >
</activity>
<activity
android:name="foo.bar.ui.activities.ShowSnapshotActivity"
android:parentActivityName="foo.bar.ui.activities.ShowLocationActivity" >
</activity>
<service
android:name="foo.bar.service.SnapshotService" >
</service>
</application>
</manifest>
I think it has done something to do with the packaging, ie. it looks at the wrong place for the activity, but I don't know how to fix it.
I tried cleaning the project and using only ".activityname" in the manifest, which both didn't work.
EDIT: I got it to work now by moving the TabsFragmentActivity to the standard package and then back to ui.tabs.
Not sure why this worked though.
Thanks for all your help