⚠️ 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
- groovy.lang.MissingPropertyException No such property Error
- How to fix java.net.NoRouteToHostException in Android Studio
- Your Android SDK is missing, out of date or corrupted SDK Problem
- [Android Studio] MainActivity does not exist
- [Android Studio] Could not automatically detect an ADB binary
- Android Studio: Cannot perform refactoring operation
- How to Configure Eclipse keymap in IntelliJ IDE
- Android Studio setup was canceled - How to resume
- [Android Studio] Hardcoded string Button, should use @string resource
- The selected device is incompatible : Android Studio
- Android Activity Main xml stuck loading
- Android Studio 1.3 beta now Available for Developers
- Installing Android Studio Dolphin on Mac with Apple (M1/M2) Chip
- Android Studio 4.2 Canary 1 now available
- [Android Studio] Button on click example
- Eclipse like Auto Import Shortcut in Intelij IDE Android Studio
- How to enable line numbers in IntelliJ Android Studio for all files
- Delete Android Studio Projects
- How to update Android Studio
- [Android Studio] Error: Missing system image on device
- macOS Big Sur java.lang.UnsatisfiedLinkError CoreFoundation - Android Studio
- Android [SDK Manager] The system cannot find the path specified
- Failed to install Android.apk on device 'emulator-5554': timeout
- [Solved] Error launching studio
- Best free Decompiler for Java - Java
- Fix - Microsoft Windows Error Code: 0xA00F4244 NoCamerasAreAttached - Microsoft
- Remove Applications from Startup Mac OS X - Mac-OS-X
- [Fix] Instant java.time.temporal.UnsupportedTemporalTypeException: Unsupported unit: Years - Java
- The service instance - SharePoint
- [fix] Chrome: no listeners for an event URLS_SAFE_CHECK__STATUS_UPDATED - Chrome
- What does -Xms and -Xmx stands for in Java? - Java
- MySQL 1005 Error : SQLSTATE: HY000 (ER_CANT_CREATE_TABLE) Message: Can't create table '%s' (errno: 150) - MySQL