Add activity in application Manifest in android

Add activity in application Manifest in android

Basically in an android application have more than one screen. you need to take more than one activity in an android application. Sometime we do all the code and run application but we forget to add application to manifest file of android application that time we face ActivityNotFoundException like below. android.content.ActivityNotFoundException: Unable to find explicit activity class {com.androidfromhome.json/com.androidfromhome.json.ListViewActivity}; have you declared this activity in your AndroidManifest.xml?


To avoid this exception just go to the application manifest file, scroll down and select "Application" tab.Now click on Add button as show in image below


Now Select "Activity" and click "OK" button as image.

Activity add to manifest file

Select taken "Activity" and Browse Activity which you want to add.

add activity to manifest

Select Activity from the list as show in image below.
add activity to manifest file

and now save manifest file to complete the process.


Related Post:-

Internet connection checking in android device

Custom Alert Dialog in android with custom xml layout

ListView in android example

Custom Toast example in android example

Leave a Reply

Your email address will not be published. Required fields are marked *

Get Widget