Eclipse显示未找到启动器活动



这是我的android Manifest.xml。

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="uk.co.halfninja.wallpaper.parallax">
    <uses-sdk android:minSdkVersion="7" />
    <uses-feature android:name="android.software.live_wallpaper" />
    <application
        android:label="@string/app_name"
        android:icon="@drawable/icon">

        <service
            android:label="@string/app_name"
            android:name=".ParallaxWallpaper"
            android:permission="android.permission.BIND_WALLPAPER">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="android.service.wallpaper" android:resource="@xml/wallpaper" />
        </service>
        <activity
            android:label="@string/wallpaper_settings"
            android:name=".ParallaxWallpaperSettings"
            android:theme="@android:style/Theme.Black.NoTitleBar"
            android:exported="true">
        </activity>
    </application>
</manifest>

Still Eclipse显示结果

 ParallaxWallpaper] No Launcher activity found!
 ParallaxWallpaper] The launch will only sync the application package on the device!
 ParallaxWallpaper] Performing sync
 ParallaxWallpaper] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.

请让我知道我在哪里犯错误,解决方案是什么。。。???

intent-filter标记从service移动到activity

这些行应该在活动标签中

 <application
    android:label="@string/app_name"
    android:icon="@drawable/icon">
    <activity
        android:label="@string/wallpaper_settings"
        android:name=".ParallaxWallpaperSettings"
        android:theme="@android:style/Theme.Black.NoTitleBar"           android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
     </activity>
    <service
        android:label="@string/app_name"
        android:name=".ParallaxWallpaper"
        android:permission="android.permission.BIND_WALLPAPER">
    </service>
    <meta-data android:name="android.service.wallpaper" android:resource="@xml/wallpaper" />
 </application>

将活动作为启动器您已经将服务作为启动器。就像

 <activity
        android:label="@string/wallpaper_settings"
        android:name=".ParallaxWallpaperSettings"
        android:theme="@android:style/Theme.Black.NoTitleBar"
        android:exported="true">
   <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

最新更新