Unable to find explicit activity class Android Eclipse error

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.my_package/com.example.my_package.MainClass}; have you declared this activity in your AndroidManifest.xml?

Is MainClass.java in AndroidManifest as a activity ?
AndroidManifest.xml example

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.my_packag"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="7" />
 
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".MainClass"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
 
    </application>
</manifest>
This entry was posted in Bugs, warnings, errors, Eclipse and tagged , , . Bookmark the permalink.


Comments are closed.



5,885 views