As the title says I keep getting this error and don’t know what I’m missing. I’ve cleaned the project several times. Here is my code:
startActivity(new Intent(this, UsrPrefs.class));
In the manifest:
<application
android:label="@string/app_name" >
<activity
android:name=".IcyArmActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="@string/app_name"
android:name=".UserPreferences"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.PREFS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
OHHHHHHHHHHHHHHHHHHHH!!!!! Thanks you guys. I thought the UsrPrefs.class was the name of the class so that is what I was using. I see the connection now. DOH!!!!
It’s because you defined a class as an activity with one name and starting the other activity which is not registered with that name in the
manifest.xmlReplace this:
with