Default Activity not found

1

After having deleted and recreated an activity I have the following problem when starting my application, I get "Default Activity not found", this is the file AndroidManifest.xml

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity" />
    <activity android:name=".SegActivity" />
    <activity android:name=".TerceraActivity" />
    <activity android:name=".QuartActivity" />
    <activity android:name=".FinalActivity"></activity>
</application>

and the MainActivity:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

Thank you!

    
asked by Moha Mohito 03.11.2017 в 16:28
source

1 answer

1

You must have in your application a Activity "default" that the application starts, for this case you must have defined the following intent-filter :

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

Add it to your Main Activity, for example:

  <activity
            android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
  </activity>
    
answered by 03.11.2017 / 16:30
source