What does it mean "No Launcher activity found!"
AndroidEclipseAndroid Problem Overview
I am writing a simple program of Android, and getting these no errors, I don't know what they are. My program is right, but showing not output. I think it is because of these two lines:
[2005-01-06 19:56:38 - my_Android] No Launcher activity found!
[2005-01-06 19:56:38 - my_Android] The launch will only sync the application package on the device!
Android Solutions
Solution 1 - Android
Here's an example from AndroidManifest.xml. You need to specify the MAIN and LAUNCHER in the intent filter for the activity you want to start on launch
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:name="ExampleActivity"
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>
Solution 2 - Android
Multiple action tags in a single intent-filter tag will also cause the same error.
Solution 3 - Android
Like Gusdor said above, "Multiple action tags in a single intent-filter tag will also cause the same error." (Give him the credit! I could just kiss Gusdor for this!)
I didn't find any docs for this fact!
I had added a new (USB) action and being clever, I lumped it in the same intent-filter. And it broke the launch.
Like Gusdor said, one intent filter, one action!
Apparently each action should go in its own intent filter.
It should look like this...
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
When I did this, WAZOO! it worked!
Solution 4 - Android
Do you have an activity set up the be the launched activity when the application starts?
This is done in your Manifest.xml file, something like:
<activity android:name=".Main" android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Solution 5 - Android
Check your manifest.xml. Make sure you have the category LAUNCHER there.
<activity android:name=".myActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Solution 6 - Android
It means you didn't specify an Activity for Android to launch as the default when the app opens from the launcher. You have to add an Intent Filter in the Manifest for the Activity you would like to act as the default when the app is being launched.
Read http://developer.android.com/guide/topics/intents/intents-filters.html#ccases for more details.
Solution 7 - Android
I fixed the problem by adding activity block in the application tag. I created the project using wizard, I don't know why my AdroidManifest.xml file was not containing application block? I added the application block:
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".ToDoListActivity"
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>
And I get the desired output on the emulator.
Solution 8 - Android
As has been pointed out, this error is likely caused by a missing or incorrect intent-filter
.
I would just like to add that this error also shows up if you set android:exported="false"
on your launcher activity (in the manifest).
Solution 9 - Android
I had this same problem and it turns out I had a '' instead of a '/' in the xml tag. It still gave the same error but just due to a syntax problem.
Solution 10 - Android
If you are using the standard eclipse IDE provided by google for Android development, you can check the "Launcher Activity" check-box while creating a new Activity. Please find below:
Solution 11 - Android
In Eclipse when can do this:
But it is preferable make the corresponding changes inside the Android manifest file.
Solution 12 - Android
Manifest is case sensitive, so please compare this lines for any case mismatch especially the word MAIN
in:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Solution 13 - Android
just add this to your aplication tag in AndroidManifest.xml file
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
and also edit the uses-sdk tag from android:targetSdkVersion="16" to 17
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
Solution 14 - Android
You missed in specifying the intent filter elements in your manifest file.Manifest file is:
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:name="Your Activity Name"
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>
Add and check this correctly. Hope this will help..
Solution 15 - Android
You can add launcher to activity in eclipse manifest visual editor:
Solution 16 - Android
MAIN will decide the first activity that will used when the application will start. Launcher will add application in the application dashboard.
If you have them already and you are still getting the error message but maybe its because you might be using more than more category or action in an intent-filter. In an intent filter there can only be one such tag. To add another category, put it in another intent filter, like the following
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!--
TODO - Add necessary intent filter information so that this
Activity will accept Intents with the
action "android.intent.action.VIEW" and with an "http"
schemed URL
-->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
Solution 17 - Android
You have not included Launcher intent filter in activity you want to appear first, so it does not know which activity to start when application launches, for this tell the system by including launcher filter intent in manifest.xml