Android模拟器未加载应用

时间:2013-06-17 13:39:15

标签: android android-emulator emulation

每当我尝试在Android模拟器上运行应用程序时,从adt包中的eclipse开始,模拟器加载并且控制台输出:

[2013-06-18 06:34:02 - Counter] No Launcher activity found!
[2013-06-18 06:34:02 - Counter] The launch will only sync the application package on the device!
[2013-06-18 06:34:02 - Counter] Performing sync
[2013-06-18 06:34:02 - Counter] Automatic Target Mode: launching new emulator with compatible AVD 'Anroid_emulator'
[2013-06-18 06:34:02 - Counter] Launching a new emulator with Virtual Device 'Anroid_emulator'
[2013-06-18 06:34:03 - Counter] New emulator found: emulator-5554
[2013-06-18 06:34:03 - Counter] Waiting for HOME ('android.process.acore') to be launched...
[2013-06-18 06:34:37 - Counter] HOME is up on device 'emulator-5554'
[2013-06-18 06:34:37 - Counter] Uploading Counter.apk onto device 'emulator-5554'
[2013-06-18 06:34:37 - Counter] Installing Counter.apk...
[2013-06-18 06:35:12 - Counter] Success!
[2013-06-18 06:35:12 - Counter] \Counter\bin\Counter.apk installed on device
[2013-06-18 06:35:12 - Counter] Done!

2 个答案:

答案 0 :(得分:1)

您是否通过进入菜单检查了您的应用是否已安装?

因为如果您忘记将活动作为启动器活动,您的应用程序将不会弹出,您可能不会注意到您的应用已经安装过。

您可以通过以下给定的标记在清单中将该活动作为启动器:

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

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

答案 1 :(得分:0)

我认为您似乎在应用程序主要活动的清单XML中缺少这些:

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

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

例如,如果您的主要活动名为MainActivity,则它应如下所示:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/FooDzines" >
    <activity
        android:name="MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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