Today | July 14, 2026
web4pps

Error running 'app': Default Activity not found on Android with Kotlin

February 22, 2023 12:07 AM

Programming

Problem:


I started learning Android and decided to use Kotlin instead of Java so I setup my first project and added MainActivity.kt and started running it in debug mode. I was so excited to run my first native app and see the output but this error killed my excitement.

Error running 'app': Default Activity not found on Android with Kotlin

It felt like I am in between two planets colliding when seeing this error so I took time to do some research and got a solution.

Solution:


Inside AndroidManifest.xml you have to add the code below within activity tag.


It should look like this:


I ran the code again and it worked perfectly.