⚠️ Error: Default Activity not found
If you are trying to run an Android Application on a Device or Emulator and you get the above error message (this can occur on both Android Studio and Eclipse IDE) then the most probable reason for this is the missing launcher activity in AndroidManifest.xml file.
Every Android Application must one application tag in the Manifest file and within it, there must be an Activity with <intent-filter> tag with action and category sub-tags. Whichever activity has these tags within it is the Launcher/Default activity which gets loaded when the App is run on a device.
Note you can have more than once activity with <intent-filter> tags in it, in such a scenario you would find App launcher icons when the App is installed on the device.
File : AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.code2care.tools.jsonwithandroid" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Note that the Activity tag should be inside the <application> </application> tag.
- Locate MainActivity Java or Kotlin file in Android Studio
- Android Studio setup was canceled - How to resume
- The selected device is incompatible : Android Studio
- Android Studio : Change FAB icon color : FloatingActionButton
- How to rename package name in Android Studio
- Android Emulator Screenshot saved location
- Android Activity Main xml stuck loading
- [Solution] Android Studio does not displays Toolbar in Layout Design
- [Event Log] Android Studio performance could be improved
- The package must have at least one . separator [Android Studio]
- Android Studio SDK Build-tools 23 rc2 not getting installed
- Android Emulator window was out of view and was recentered
- Emulator: Warning: restoring GLES1 context from snapshot. App may need reloading.
- How to Import External Jars to Android Studio Project
- How to install Android Studio Chipmunk and SDK tools on macOS (2021.2)
- Create assets folder in Android Studio
- Eclipse like Auto Import Shortcut in Intelij IDE Android Studio
- Android Emulator 5.1.1 not loading on Mac OS X Android Studio
- Your Android SDK is missing, out of date or corrupted SDK Problem
- macOS Big Sur java.lang.UnsatisfiedLinkError CoreFoundation - Android Studio
- [Android Studio] How to locate code for activity_main.xml
- groovy.lang.MissingPropertyException No such property Error
- Installing Android Studio Dolphin on Mac with Apple (M1/M2) Chip
- Step-by-Step: How to install Flutter in Android Studio
- [Solved] Error launching studio
- Python: Traverse List Backwards - Python
- How to Restart Mac using Terminal Command - MacOS
- 5 Ways to Loop a Dictionary in Python - Python
- Java: Convert Stream to List - Java
- Change the background of Tkinter label or text - Python
- How to get file path in Idea IntelliJ IDE - Java
- Jupyter Notebook add Table Of Contents (TOC) - Python
- List of PowerShell Cmdlet Commands for Mac - Powershell