[Solved-5 Solutions] Error: Default Activity Not Found
Error Description:
After upgrading to IntelliJ Idea 12.0.4 to 12.10. All the modules in the Android project give the error:
Error: Default Activity Not Found
Solution 1:
- If we see that error occur after upgrading versions of IntelliJ IDEA or Android Studio, or after Generating a new APK, we may need to refresh the IDE's cache.
Solution 2:
- Right click on the project and choose Open Module Settings. Then go to the Sources tab in the module, find the src folder, right click on it and mark it as Sources (blue color).
- There is no sources tab in later versions of Android Studio, but we can edit the build.gradlefile instead.
Solution 3:
- In Android Studio under Run/Debug Configuration -> Android Application -> General -> Activity -> select the option "Do not launch Activity".
Solution 4:
- If you are working on a widget app:
- Go to Edit Configuration
- Set Launch Option to nothing
Solution 5:
- In case the application doesn't have an Activity (only a service for example), change the run/debug configuration 'Launch' option to ‘Nothing’.