-1

应用程序安装成功但没有在模拟器上启动我正在使用服务,可能是我在这里启动服务时做错了我正在放置清单和控制台详细信息任何一个帮助启动我的应用程序

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        android:installLocation="auto"
        package="fi.harism.wallpaper.flowers"
        android:versionCode="10"
        android:versionName="3.2" >

        <uses-sdk android:minSdkVersion="8" />

        <uses-feature android:glEsVersion="0x00020000" />
        <uses-feature android:name="android.software.live_wallpaper" />

        <application
            android:icon="@drawable/ic_application"
            android:label="@string/app_name" >
            <service
                android:name=".FlowerService"
                android:description="@string/description"
                android:label="@string/app_name"
                android:permission="android.permission.BIND_WALLPAPER" >
                <intent-filter>
                    <action android:name="android.service.wallpaper.WallpaperService" />
                </intent-filter>

                <meta-data
                    android:name="android.service.wallpaper"
                    android:resource="@xml/flowers" />
            </service>

            <activity
                android:name=".prefs.FlowerPreferenceActivity"
                android:exported="true"
                android:label="@string/preferences_name" />
        </application>

    </manifest>

    [2012-12-14 14:33:30 - flowers] Android Launch!
    [2012-12-14 14:33:30 - flowers] adb is running normally.
    [2012-12-14 14:33:30 - flowers] No Launcher activity found!
    [2012-12-14 14:33:30 - flowers] The launch will only sync the application package on the device!
    [2012-12-14 14:33:30 - flowers] Performing sync
    [2012-12-14 14:33:30 - flowers] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'AVD_4.0'
    [2012-12-14 14:33:30 - flowers] Uploading flowers.apk onto device 'emulator-5554'
    [2012-12-14 14:33:31 - flowers] Installing flowers.apk...
    [2012-12-14 14:33:37 - flowers] Success!
    [2012-12-14 14:33:37 - flowers] \flowers\bin\flowers.apk installed on device
    [2012-12-14 14:33:37 - flowers] Done!
4

1 回答 1

1

在 Intent 过滤器中应用此代码。

 <activity
    android:name=".prefs.FlowerPreferenceActivity"
    android:exported="true"
    android:label="@string/preferences_name"> 
 <intent-filter>
     <action android:name="android.intent.action.MAIN" />
     <category android:name="android.intent.category.LAUNCHER" />    
 </intent-filter>
</activity>
于 2012-12-14T09:22:19.973 回答