I upgraded IntelliJ Idea 12.0.4 to 12.10.
Now all the modules in my Android project give the error:
Error: Default Activity Not Found
I reverted to 12.0.4 and it works.
Any ideas ?? I think it might be related to some plugins not being installed cause the only other thing could have been a local config but I deleted the configuration folder to confirm and that didn't change anything.
I found this in my code:
If you look very carefully, it should be
<activity android:name=".MainActivity">
instead.Apparently, I refactored an "activity" somewhere, and it changed names in the AndroidManifest as well.
Error: Default Activity Not Found
I solved this way
Run>>Edit Configuration >>Android Application >> Enter the path of your default activity class in "Launch" Edit Box.
Well I got this error too,
well in my case it was for wear module ..I don't need an Activity there so what i do is simply
Note: Don't forget to Clean Project and Sync Gradle Files.
Try to right click on the project and choose Open Module Settings. Then go to the Sources tab in your module, find the src folder, right click on it and mark it as Sources (blue color).
EDIT: There is no sources tab in later versions of Android Studio, but you can edit the build.gradle file instead: https://stackoverflow.com/a/22028681/1101730
I got this error.
And found that in manifest file in launcher activity I did not put
action
andcategory
in intent filter.Wrong One:
Right One:
I started with a demo app and modified it. I change the java path inside source from com -> example -> foo to my own and edited the manifest; however, Android Studio (0.8.7) got very confused.
I tried everything listed above and none of it worked for me. Maybe it even made things worse?
My final solution was to edit
<projectname>.iml
in the.idea
subdirectory by opening it up in Android Studio (aka text editor).Before:
I (re)added the src directory (2nd line). After:
After saving it, Android Studio reloaded and started functioning as expected.