⚠️ 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.
- [Android Studio] failed to find Build Tools revision 23.0.0 rc1
- Android Studio: Cannot perform refactoring operation
- Error running 'app': No target device found.
- Building library Gradle Project Info: Downloading services.gradle.org
- Failed to install Android.apk on device 'emulator-5554': timeout
- Android Emulator 5.1.1 not loading on Mac OS X Android Studio
- How to Configure Eclipse keymap in IntelliJ IDE
- Android Studio 1.3 beta now Available for Developers
- Instant Run requires Tools | Android | Enable ADB integration to be enabled
- Android Studio : Implement abstract methods shortcut
- Android : Error in http connection java.net.SocketException: Permission denied - Android
- How to create Toast messages in Android - Android
- How to Search Something (string) in Android Studio Project like Eclipse - Android-Studio
- How to detect Browser and Operating System Name and Version using JavaScript - JavaScript
- Free Unlimited Calls from MTNL & BSNL Landlines from 1st May 2015 - HowTos
- Adding internet permission to Android Project - Android
- How to turn off Facebook autoplay videos on timeline - Facebook
- Android : How to make TextView Scrollable - Android
- Sharepoint Server 2016 installation Prerequisites with download links - SharePoint
- How to get current URL Location using Javascript HTML - JavaScript
- Android Toast position top - Android
- How to submit website to dmoz directory - HowTos
- SharePoint Server 2016 setup error - A system restart from a previous installation or update is pending. Restart your computer and run setup to continue. - SharePoint
- Java XML-RPC 3.1.x based web service example - Java
- Plug-in com.android.ide.eclipse.adt was unable to lead class Error - Android