Activity not found

0

I deleted the MainActivity and created 2 Layouts.

One with a name of activity_acessar and activity_menu .

But when I run it displays the following message.

  

Error running app: Default Activity not found.

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name="org.view.activityAcessar" />
    <activity android:name="org.view.activityMenu"></activity>

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

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

</application>

    
asked by anonymous 09.01.2017 / 21:06

1 answer

2

You need to put intent-filter inside your activity . See:

<activity android:name="org.view.activityAcessar">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

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

<action android:name="android.intent.action.MAIN" /> is the application entry point, that is, when you start the application, this activity is created.

You can see more details in the documentation .

    
09.01.2017 / 21:30