in my application I call
startActivityForResult( new Intent(this, ShowPreferencesActivity.class), <some code>);
the activity is declared as :
package ca.qc.webalterpraxis.cinedroid.activity.preference;
public class ShowPreferencesActivity extends PreferenceActivity { ...}
and in my manifest I got :
<activty android:name=".activity.preference.ShowPreferencesActivity" android:label="@string/set_preferences">
But I receive an exception when I try to start the activity (in the first line of code of this question) :
E/AndroidRuntime(1830): android.content.ActivityNotFoundException: Unable to find explicit activity class {ca.qc.webalterpraxis.cinedroid/ca.qc.webalterpraxis.cinedroid.activity.preference.ShowPreferencesActivity}; have you declared this activity in your AndroidManifest.xml?
I tried everything I could :
- replacing, in the manifest, the name of the class with the fully qualified name of the class
- setting the intent class name using setClassName
- providing a default filter for the activity
I relaunched eclipse around 10 times, rebooted my computer, erased the application from the device, resintalled, etc…
I don’t have any idea of what’s happening. And the worse is that it was working before, but not anymore after I renamed the class. Something strange : even if I rename the class now, the AndroidManifest won’t update in eclipse, I have to update it by hand..but it still works for other classes…
Also, please note that I have a test application, apart of the under test app, and the test app can’t find the activity to instrument it, neither.
Oh, and last but not least, I am 100 % sure that the ShowPreferencesActivity is in the resulting dex file, I dexdumped it to check.
Thanks in advance for your time.
(I use the maven-android-plugin)
Thanks all, I found my problem : the tag in the manifest was
and not
But why does eclipse allow that ???!!!