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 blog that really fixed this issue in my case. It turns out you have to add some sort of intent:
It was definitely straightforward. Reference:
https://www.aboutonline.info/2018/08/error-running-app-default-activity-not-found-on-android-with-kotlin.html
just faced this error on android studio 2.1.2. solved by adding MAIN/LAUNCHER intent-filter to default activity in flavour manifest, though filter already was in default activity in default manifest. It even was in merged manifest, but studio can't found it until i duplicated filter in both manifests.
I have the same problem in Android Studio 3.3 Canary 3. Project from Android Studio 3.0 stabile version works firstly correctly, than after some cleans/rebuilds it starts showing No Default Activity error. I tried to reinstall this alpha version of Android Studio: error again. But then started it in old stabile Android, and using apk install, and this apk works correctly.
Moreover my project was created with Instant App (base, feature, instant, app subdirectories). I think this Android Studio has some problems with Manifest.xml files separated into this multiple directories.
So I have changed in settings to this:
Build -> Rebuild Project
File -> Invalidate Caches.. -> Invalidate and restart
It works for me. Rebuild project to make sure that no errors in project. Then we can invalidate cache.
In my case
File -> Invalidate Caches / Restart...
didn't helpEverything was ok with my project and of course I had next intent filter for my activity
What really helped me is deleting Android/Gradle cache folders (they can grow up to 10-30 GB)
Go to
C:\Users\YOUR_USER_WINDOWS_NAME
and delete next folders(you may save some Android configs from
.AndroidStudio3.2
before deleting it if you want it)You can create bat file
CLEAR_CACHE.cmd
like this to delete folders without Recycle Binit would work much faster and you don't have to delete it also from Recycle Bin
p.s. put
CLEAR_CACHE.cmd
intoC:\Users\YOUR_USER_WINDOWS_NAME
it's also a good idea to delete Android Studio folder and download it again
Sometimes uninstalling the app for all users helps. Go to Application list in settings go to your app or scroll till the end of the list, then uninstall it. Hope this helps