HelloAndroid]emulator-5554 断开连接!取消“com.example.helloandroid.HelloAndroid 活动启动”!

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2160454/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 04:45:47  来源:igfitidea点击:

HelloAndroid]emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!

android

提问by wang813

I am new to Android. Follow the HelloAndroid Tutorials by use Eclipse. After run HelloAndroid, the AVD 'xian_avd2' lunched, but stop there, no " Hello, Android" displayed on AVD. Looks like Waiting for HOME ('android.process.acore') to be launched...

我是安卓新手。使用 Eclipse 遵循 HelloAndroid 教程。运行 HelloAndroid 后,AVD 'xian_avd2' 就开始了,但停在那里,AVD 上没有显示“Hello, Android”。看起来正在等待 HOME ('android.process.acore') 启动...

Not know how to resolve this, please help. Thanks wang813

不知道怎么解决,求帮助。谢谢wang813

[2010-01-29 00:12:13 - HelloAndroid]------------------------------
[2010-01-29 00:12:13 - HelloAndroid]Android Launch!
[2010-01-29 00:12:13 - HelloAndroid]adb is running normally.
[2010-01-29 00:12:13 - HelloAndroid]Performing com.example.helloandroid.HelloAndroid activity launch
[2010-01-29 00:12:13 - HelloAndroid]Automatic Target Mode: Preferred AVD 'xian_avd2' is not available. Launching new emulator.
[2010-01-29 00:12:14 - HelloAndroid]Launching a new emulator with Virtual Device 'xian_avd2'
[2010-01-29 00:12:37 - HelloAndroid]New emulator found: emulator-5554
[2010-01-29 00:12:37 - HelloAndroid]Waiting for HOME ('android.process.acore') to be launched...
[2010-01-29 00:13:59 - HelloAndroid]emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!

回答by Z?ta

  1. Open Android Virtual Device Manager
  2. select the AVD you use for your app.
  3. Press the start button and wait for a new form to show up called (Launch Options).
  4. Check the box "Wipe user data" and hit "Launch" button.
  1. 打开安卓虚拟设备管理器
  2. 选择您用于应用的 AVD。
  3. 按开始按钮并等待出现一个名为(启动选项)的新表单。
  4. 选中“擦除用户数据”框并点击“启动”按钮。

This should work.

这应该有效。

--- OR ---

- - 或者 - -

  1. Open Android Virtual Device Manager
  2. Delete the AVD you use for your app.
  3. Create an new AVD.
  4. Start your new AVD.
  1. 打开安卓虚拟设备管理器
  2. 删除您用于应用的 AVD。
  3. 创建一个新的 AVD。
  4. 启动您的新 AVD。

This should also work.

这也应该有效。

回答by kunal

Try to use the command emulator -avd emulator_name -wipe-data

尝试使用命令 emulator -avd emulator_name -wipe-data

回答by wiztrail

The problem as I discovered lays in the fact the the project has no appropriate Virtual Device defined for it in the AVD manager.

我发现的问题在于该项目在 AVD 管理器中没有为其定义适当的虚拟设备。

So the recommended steps in eclipse are:

所以eclipse中推荐的步骤是:

  1. Go to "Project"-> Properties-> Android.
  2. On the right pane see what line is checked in the Project build target.
    Remember the target platform numberthat appears in the selected line.
  3. Go to "Windows"-> AVD Manager.
  4. Check the list of existing Android Virtual Devices for a device that matches the Platform and API level that you have set for your project (see step #2 above).
  5. If there is no line that includes an AVD for your platform (as I suspect), add it using the "New" button.
  6. A "Create New Android Virtual Device" window will be opened. set a new device name. in the "Target" selection box choose the right platform for your project.
  1. 转到“项目”-> 属性-> Android。
  2. 在右侧窗格中,查看 Project 构建目标中选中的行。
    记住出现在所选行中的目标平台编号
  3. 转到“Windows”-> AVD 管理器。
  4. 检查现有 Android 虚拟设备列表,查找与您为项目设置的平台和 API 级别相匹配的设备(请参阅上面的第 2 步)。
  5. 如果没有包含适用于您平台的 AVD 的行(我怀疑),请使用“新建”按钮添加它。
  6. 将打开“创建新的 Android 虚拟设备”窗口。设置一个新的设备名称。在“目标”选择框中为您的项目选择正确的平台。

Enjoy your emulator once again!

再次享受你的模拟器!

回答by Brian C. Lane

I had a similar problem -- it ended up I wasn't waiting long enough for the emulator to run the OS before trying to install the app. Launch the emulator and then wait for the home screen to appear before running the app in Eclipse.

我有一个类似的问题——结果我没有等待足够长的时间让模拟器在尝试安装应用程序之前运行操作系统。启动模拟器,然后等待主屏幕出现,然后再在 Eclipse 中运行应用程序。

回答by George Gas

Maybe it's an AVD problem for existing machine. Try to create a new AVD from the AVD Manager and delete the old one.

也许这是现有机器的 AVD 问题。尝试从 AVD 管理器创建一个新的 AVD 并删除旧的。

回答by QAMAR

I resolved it (Mac) by following these steps,

我按照以下步骤解决了它(Mac),

  • Run Emulator
  • Keep the Emulator, (no matter same error occurs)
  • Make Sure the Home Screen of Emulator is appeared
  • go to Window -> Show Perspective -> DDMS --> In Devices Panel -> on Corner Drop Down Menu -> Reset adb
  • 运行模拟器
  • 保持模拟器,(无论发生同样的错误)
  • 确保出现模拟器的主屏幕
  • 转到窗口 -> 显示透视图 -> DDMS -> 在设备面板中 -> 在角落下拉菜单 -> 重置 adb

I Hope it helps

我希望它有帮助

回答by JohnEye

This can happen on slow computers when the emulator doesn't start in time. When it eventually does start, it is no longer connected to ADB. The solution is to restart ADB so that it reconnects to the emulator. You can do this by executing the following in command line:

当模拟器没有及时启动时,这可能发生在速度较慢的计算机上。当它最终启动时,它不再连接到 ADB。解决方案是重新启动 ADB,使其重新连接到模拟器。您可以通过在命令行中执行以下命令来做到这一点:

adb kill-server
adb start-server

回答by BarleyWarb

For me, I believe it happened due to an unexpected power failure while the emulator was running. Having it not shut down properly meant that my session was still cached. (I would occasionally get these errors too):

对我来说,我相信它是由于模拟器运行时意外断电而发生的。它没有正确关闭意味着我的会话仍然被缓存。(我偶尔也会遇到这些错误):

[2012-06-08 05:05:06 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2012-06-08 05:05:06 - Emulator] WARNING: SD Card image already in use: C:\Users\Ben\.android\avd\Ben-Android.avd/sdcard.img
[2012-06-08 05:05:06 - Emulator] WARNING: Cache partition already in use. Changes will not persist!

If this happened to you, pull up the command line, navigate to your android-sdk\tools and follow the corrected top post: emulator -avd emulator_name -wipe-data

如果您遇到这种情况,请调出命令行,导航到您的 android-sdk\tools 并按照更正的顶部帖子进行操作:emulator -avd emulator_name -wipe-data

回答by Manohar

I was having the same issue, I deleted my AVD and created afresh - after that I do not see such problems.

我遇到了同样的问题,我删除了我的 AVD 并重新创建 - 之后我没有看到这样的问题。

回答by Sam

also same problem for me..

对我来说也是同样的问题..

go to DDMS perspective-->select Device-->go to Window-->Navigation-->Show view menu-->reset adb.. it works for me.

转到 DDMS 透视图--> 选择设备--> 转到窗口--> 导航--> 显示视图菜单--> 重置 adb .. 它对我有用。