When you run the android application in the Android Studio and you face an error, The Activity Must be Exported or something like below.

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

There are possible solutions which can help in getting rid of the error.

Possible Solution 1

if you face The Activity Must be Exported error. First, you should double check the manifest code and look for below code.

Your main activity must have this code inside the activity tag. It should look like

Possible Solution 2

if The Activity Must be Exported error doesn’t go away by following the solution 1 then follow solution 2.

There is a drop-down menu beside the Green Run (play) icon. Select the “app” from the drop-down and run your app again.

The Activity Must be Exported - Android Studio

 

Coding in the android studio is not so hard but sometimes we face errors which really make us annoy but we try our best to get rid of the errors, sometimes it’s hard to find the solution to the problem or error.

Final Words for The Activity Must be Exported Error

If the problem still persists, and you’re not able to solve it, just let us know in the comment with the snap of code and little description that what you’re trying to do. We will try our best to get back to you as soon as possible.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!