应用已安装但未在我的模拟器上启动

时间:2012-12-13 15:37:36

标签: android

  

在我的模拟器应用程序安装成功但应用程序未启动时,我在这里粘贴控制台详细信息   在这里我也添加清单文件,我也添加了intent-filter。   我希望这些信息足够,但stackoverflow需要更多信息。

 [2012-12-13 20:29:52 - PongUr2] Android Launch!
    [2012-12-13 20:29:52 - PongUr2] adb is running normally.
    [2012-12-13 20:29:52 - PongUr2] No Launcher activity found!
    [2012-12-13 20:29:52 - PongUr2] The launch will only sync the application package on the device!
    [2012-12-13 20:29:52 - PongUr2] Performing sync
    [2012-12-13 20:29:52 - PongUr2] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'AVD_4.0'
    [2012-12-13 20:29:52 - PongUr2] Uploading PongUr2.apk onto device 'emulator-5554'
    [2012-12-13 20:29:53 - PongUr2] Installing PongUr2.apk...
    [2012-12-13 20:30:00 - PongUr2] Success!
    [2012-12-13 20:30:01 - PongUr2] \PongUr2\bin\PongUr2.apk installed on device
    [2012-12-13 20:30:01 - PongUr2] Done!

这里是xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sabrebutt.pongur"
    android:versionCode="49"
    android:versionName="0.8.8.2" >

    <application
        android:icon="@drawable/icon"
        android:label="@string/app_name" >
        <service
            android:name="PongUr"
            android:enabled="true"
            android:icon="@drawable/icon"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_WALLPAPER" >
            <intent-filter android:priority="1" >
                <action android:name="android.service.wallpaper.WallpaperService" />

                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </intent-filter>

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

        <activity
            android:name="PongUrSettings"
            android:exported="true"
            android:label="@string/pongur_settings"
            android:theme="@android:style/Theme.Black" >
        </activity>
    </application>

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

</manifest>

2 个答案:

答案 0 :(得分:5)

您的所有活动都没有启动器意图过滤器,将以下行添加到您要在清单中启动的活动

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

编辑: 你不能在intentFilter中有一个intentfilter,并且启动器意图过滤器不能用于服务,只有活动可以启动并且可以有UI

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

答案 1 :(得分:0)

尝试前往Setting -> Application(apps) --> uninstall your app&amp;再次运行你的应用程序可能它应该工作。有时以前的安装会产生这种类型的问题。否则你的清单文件可能会有问题。

相关问题