I’m making an android widget, but I got this warning from console when running my application on emulator
No Launcher activity found!
The launch will only sync the application package on the device!
Here is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.analogclock.android"
android:versionCode="1"
android:versionName="1.0"
>
<uses-sdk android:minSdkVersion="3" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<receiver
android:name=".AnalogClockWidget"
android:label="@string/app_name" />
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget" />
</application>
</manifest>
What’s the reason? Please give me a solution
This is normal as your widget does indeed not have any activity!
I am guessing you are using the Run or Debug button on Eclipse.
In this case the Run button cannot add your widget to the home screen for you, so it only install the package and give you this warning.
Check that your widget appears in the chooser, when you try to add a widget on the home screen. If it does, then it is working as expected 🙂
EDIT: try with this manifest: