Fix Default Activity Not Found Error on Android Studio Upgrade - Android
If you are encountering the "Default Activity Not Found" error after upgrading your Android Studio, don't worry, you are not alone. This error is a common issue that arises due to the changes in the Android Studio's configuration files.
The primary reason for this error is the modification of the manifest file during the Android Studio upgrade. The manifest file is an essential part of any Android application and contains information about the application's components, such as activities, services, and receivers.
To fix this error, you need to follow the steps mentioned below:
Step 1: Check the Manifest File
Ensure that the manifest file is correctly configured. Open the manifest file and check if the "android.intent.action.MAIN" and "android.intent.category.LAUNCHER" are set correctly for the default activity.
<intent-filter> <action android_name="android.intent.action.MAIN" /> <category android_name="android.intent.category.LAUNCHER" /> </intent-filter>
Step 2: Clean and Rebuild the Project
Clean and rebuild the project to ensure that all the changes made to the manifest file are reflected in the project. To do this, go to the "Build" menu and select "Clean Project". Then, go to the "Build" menu again and select "Rebuild Project".
Step 3: Invalidate Caches and Restart Android Studio
If the above steps do not resolve the issue, try invalidating caches and restarting Android Studio. To do this, go to the "File" menu and select "Invalidate Caches / Restart".
These steps should fix the "Default Activity Not Found" error on Android Studio upgrade. Remember to keep a backup of your project before making any changes to avoid any data loss.