应用程序已安装但未在我的Android设备中启动

时间:2012-12-14 09:09:09

标签: android

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

<?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!

1 个答案:

答案 0 :(得分: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>