[Android环境搭建] emulator-5554 disconnected! Cancelling问题解决

今天,将Andorid的开发环境从台式机迁移到笔记本上,结果启动笔记本上新建的工程时,发现AVD中原来开发的应用运行正常,

而新建的工程出现emulator-5554 disconnected! Cancelling问题。

错误的log
[2012-03-14 10:03:14 - helloWord] ------------------------------
[2012-03-14 10:03:14 - helloWord] Android Launch!
[2012-03-14 10:03:14 - helloWord] adb is running normally.
[2012-03-14 10:03:14 - helloWord] Performing test.android.HelloWordActivity activity launch
[2012-03-14 10:03:14 - helloWord] Automatic Target Mode: Preferred AVD 'hello' is not available. Launching new emulator.
[2012-03-14 10:03:14 - helloWord] Launching a new emulator with Virtual Device 'hello'
[2012-03-14 10:03:48 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2012-03-14 10:03:48 - helloWord] New emulator found: emulator-5554
[2012-03-14 10:03:49 - helloWord] Waiting for HOME ('android.process.acore') to be launched...
[2012-03-14 10:03:54 - helloWord] emulator-5554 disconnected! Cancelling 'test.android.HelloWordActivity activity launch'!

应该是迁移过程中虚拟的SD卡发生损坏,造成新应用无法写入虚拟SD卡造成,参照大家的解决方法,将AVD删除重新建立,

应用启动正常。

从而推论以后要迁移开发环境与SDK应该重新建立AVD确保应用写入正常。

 

还有一种说法是:手动关掉未启动的AVD或者手动关闭AVD时,虚拟机并未彻底关闭掉造成的。

可以手动建一个bat批处理处理一下即可。

代码如下:

@echo off
[盘符]

cd [sdk的tools所在路径]

emulator -avd [虚拟机的名称]

 

[注]在 Debug As->Debug Configuration->Target下

选中Wipe User Data选项。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值