Android Studio: Default Activity Not Found

Assuming your AndroidManifest.xml is setup properly.

<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
    <application ...>
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

You can try changing Android Studio -> Run -> Edit Configurations, at Android App -> app -> General -> Launch Options, changed from Default Activity to Specific Activity then pick and activity. If the problem still persist, then this is a Android Studio problem and not a configuration issue.

NOTE: You can also try opening other Android projects.

Solutions

You might need to try one or more of the following solutions.

  1. Android Studio -> File -> Invalidate Caches / Restart ...
  2. Android Studio -> Build -> Clean Project / Rebuild Project
  3. Android Studio -> File -> Sync Project with Gradle files
  4. Close Android Studio, goto C:\Users\[USER]\.AndroidStudio3.3\system and delete caches directory.

NOTE: Solution 4 work for my case.

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.