Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The activity must be exported or contain an intent-filter

when I tried to run my application its show the error below

Error running Dashboard: The activity must be exported or contain an intent-filter 

How can I solve this error?

like image 836
Fahda.Shalhoub Avatar asked Nov 09 '16 13:11

Fahda.Shalhoub


2 Answers

I changed the Select Run/Debug Configuration from my MainActivity to App and it started working. Select App configuration snapshot:

enter image description here

like image 163
dipesh Avatar answered Oct 02 '22 05:10

dipesh


Double check your manifest, your first activity should have tag

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

inside of activity tag.

If that doesn't work, look for target build, which located in the left of run button (green-colored play button), it should be targeting "app" folder, not a particular activity. if it doesn't targeting "app", just click it and choose "app" from drop down list.

Hope it helps!

like image 35
yfsx Avatar answered Oct 02 '22 06:10

yfsx