【问题标题】:Android not loading appAndroid没有加载应用程序
【发布时间】:2010-10-14 14:12:43
【问题描述】:

我正在浏览 Android Hello World,但是当我在 Eclipse 中转到 Run > Run 时,它会加载模拟器,需要一些时间,然后加载 Android 主屏幕。我的应用没有像教程说的那样自动加载,而且我在应用列表中找不到它。

如何让我的应用启动?我可能做了什么?

我正在使用 Eclipse,并针对 Android 2.2

编辑*

当我从 Eclipse 运行应用程序时,我在 concole 中得到以下输出:

// Android Launch!
// adb is running normally.
// Performing com.adamharte.helloandroid.HelloAndroid activity launch
// Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
// Launching a new emulator with Virtual Device 'my_avd'

模拟器在黑屏上启动,显示“android_”,然后显示闪烁的蓝色 android 徽标,然后进入“解锁”屏幕。我将锁向右拖动,然后它进入 android 主屏幕。我在任何主屏幕或应用程序列表中都找不到我的“HelloWorld”应用程序。

【问题讨论】:

  • 贴一些代码,一些错误信息。模拟器启动后再次尝试运行它。
  • 没有错误。当我在加载后再次尝试运行时,它告诉我数据图像已被另一个模拟器使用。

标签: android mobile


【解决方案1】:

您是否在第一次运行应用程序时执行了 Run As Android Application?如果你不这样做,Eclipse 可能会做错事。

【讨论】:

  • 是的,我从点击运行时弹出的列表中选择了“Android 应用程序”。
【解决方案2】:

通常,当您在模拟器上看到主屏幕时,它会显示“按菜单解锁”,因此请务必这样做。

另外,检查控制台显示的内容(您应该在 Eclipse 中找到此选项卡)。它应该表明它已经安装了apk,然后它表明它正在启动活动。

完整的输入应该与此类似

[2010-08-24 10:15:05 - Big Words] Android Launch!
[2010-08-24 10:15:05 - Big Words] adb is running normally.
[2010-08-24 10:15:05 - Big Words] Performing net.cogitas.bigwords.BigWords activity launch
[2010-08-24 10:15:08 - Big Words] Launching a new emulator with Virtual Device '16'
[2010-08-24 10:15:11 - Big Words] New emulator found: emulator-5554
[2010-08-24 10:15:11 - Big Words] Waiting for HOME ('android.process.acore') to be launched...
[2010-08-24 10:15:48 - Big Words] WARNING: Unknown device API version!
[2010-08-24 10:15:48 - Big Words] HOME is up on device 'emulator-5554'
[2010-08-24 10:15:48 - Big Words] Uploading Big Words.apk onto device 'emulator-5554'
[2010-08-24 10:15:49 - Big Words] Installing Big Words.apk...
[2010-08-24 10:16:04 - Big Words] Success!
[2010-08-24 10:16:04 - Big Words] Starting activity net.cogitas.bigwords.BigWords on device 
[2010-08-24 10:16:15 - Big Words] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=net.cogitas.bigwords/.BigWords }

【讨论】:

  • 嗯,感谢您发布您的输出。有什么想法为什么我的只有前 5 行左右?
【解决方案3】:

您必须确保在 Android SDK 和 AVD 管理器中安装了正确的软件包。为了安全起见,只需安装所有可用的软件包。然后,您必须确保在 Eclipse 中为您的 SDK 设置了正确的路径。

同时确保您已经为您将使用的目标创建了一个 Android 虚拟设备 (AVD)。

为了额外节省,在安装或配置时以“管理员身份”运行所有内容。

【讨论】:

    猜你喜欢
    • 2018-09-30
    • 2017-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-10
    • 1970-01-01
    • 1970-01-01
    • 2015-06-25
    相关资源
    最近更新 更多