【问题标题】:android app not starting in emulatorandroid应用程序没有在模拟器中启动
【发布时间】:2011-12-11 19:52:42
【问题描述】:

我有一个桌面上的 Eclipse 工作正常,但最近在一台具有 2.4 Ghz 内核间 2 双核的旧笔记本电脑上安装时,我遇到了一些问题。

在测试安卓应用程序并运行模拟器时,它会启动,但加载完成后,会以锁定屏幕启动。然后我解锁它并回家,但我找不到应用程序在哪里,因为不在应用程序菜单中。所以我认为是没有加载应用程序?

控制台消息:

[2011-12-11 22:13:58 - ha] ------------------------------
[2011-12-11 22:13:58 - ha] Android Launch!
[2011-12-11 22:13:58 - ha] adb is running normally.
[2011-12-11 22:13:58 - ha] No Launcher activity found!
[2011-12-11 22:13:58 - ha] The launch will only sync the application package on the device!
[2011-12-11 22:13:58 - ha] Performing sync
[2011-12-11 22:13:58 - ha] Automatic Target Mode: launching new emulator with compatible AVD '40'
[2011-12-11 22:13:58 - ha] Launching a new emulator with Virtual Device '40'
[2011-12-11 22:14:08 - Emulator] 2011-12-11 22:14:08.267 emulator-arm[2180:80b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
[2011-12-11 22:14:08 - ha] New emulator found: emulator-5554
[2011-12-11 22:14:08 - ha] Waiting for HOME ('android.process.acore') to be launched...
[2011-12-11 22:15:00 - ha] HOME is up on device 'emulator-5554'
[2011-12-11 22:15:00 - ha] Uploading ha.apk onto device 'emulator-5554'
[2011-12-11 22:15:01 - ha] Installing ha.apk...

请问如何解决?

【问题讨论】:

  • 您在日志中看到了什么?

标签: android android-emulator


【解决方案1】:

注意这条线

[2011-12-11 22:13:58 - ha] No Launcher activity found!

它表示没有将 Intent-Filter 指定为应用程序的 MAIN 和 LAUNCHER Activity

AndroidManifest.xml 中应该是这样的:

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

在这里阅读更多:

【讨论】:

    【解决方案2】:

    查看 manifest.xml 并检查您的应用是否有启动器。如果有,请检查您的日志文件。

    【讨论】:

      猜你喜欢
      • 2014-05-08
      • 1970-01-01
      • 2013-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多