无法在设备“emulator-5554”上安装 *.apk:EOF

发布于 2024-11-15 22:47:56 字数 401 浏览 2 评论 0原文

我尝试运行的项目设置为minSDK level 7。在运行Android虚拟设备5554(其他设备运行良好)时,我收到了上述错误消息。它运行速度如此之慢,并且花费了太多时间才能使主屏幕甚至无法运行。最后,它给出了这个错误:

无法在设备“emulator-5554”上安装 *.apk:EOF

我多次重新启动计算机和 Eclipse,以及清理项目。我也尝试过这个为什么Android模拟器这么慢?我们如何才能加快 Android 模拟器的速度? 来解决这个问题。昨天,它运行得很好。现在却如此迟缓。

有什么建议或帮助吗?谢谢

The project I tried to run is set to minSDK level 7. I have gotten the above error message when running Android virtual device-5554(the other devices work well). It is working so slowly, and taking too much time to get home screen not even run. At the end, it gives this error :

Failed to install *.apk on device 'emulator-5554': EOF

I restarted my computer and Eclipse several times, as well as clean projects. I also tried this Why is the Android emulator so slow? How can we speed up the Android emulator? to get it fixed. Yesterday, it was working pretty well. Now it is so sluggish.

Any suggestion or help? Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(21

你的心境我的脸 2024-11-22 22:47:56

我多次遇到过这个问题。在每个步骤运行 APK 文件后尝试以下每个步骤,如果它不起作用,请移至下一步:

  1. 再次运行。 (只需尝试重新运行即可)。
  2. 项目 -> 清理(清理项目及其依赖的任何项目)。
  3. 右键单击包资源管理器中的项目,然后将其关闭。然后关闭 Eclipse。然后重新打开两者。
  4. 与上一步相同,加上 Project->Clean。
  5. 重新启动 AVD。
  6. 删除 AVD。然后进入 Android-Sdk 文件夹中保存 AVD 的文件夹,并删除任何具有 AVD 名称的内容(一个文件加一个文件夹)。您可能需要重新启动计算机才能将其删除。创建一个新的 AVD。

I've ran into this problem many times. Try each of these steps after each step run the APK file if it doesn't work move to the next step:

  1. Run it again. (simply try rerunning it).
  2. Project->Clean (clean the project plus any projects that it relies on).
  3. Right click project in the package explorer then close it. Then close Eclipse. Then reopen both.
  4. Same as the previous step plus Project->Clean.
  5. Restart the AVD.
  6. Delete the AVD. Then go into the folder that holds the AVD in the Android-Sdk folder and delete anything with the AVD's name (a file plus a folder). You may have to restart your computer to get it to delete. Create a new AVD.
贱人配狗天长地久 2024-11-22 22:47:56

运行下一个命令:

adb kill-server
adb start-server

是否可能绘制下一条消息
DeviceMonitor]连接尝试:1
DeviceMonitor]连接尝试:2

Run the next command:

adb kill-server
adb start-server

Is possible that drawn the next messages
DeviceMonitor]Connection attempts: 1
DeviceMonitor]Connection attempts:2

拔了角的鹿 2024-11-22 22:47:56

解决方案:

  1. 启动模拟器(单独)并等待其完全加载。
  2. 打开钥匙锁。
  3. 导航到 Eclipse 并运行您的应用程序。

问题原因: Android 模拟器尚未加载所有处理新应用程序安装的库,因此您会遇到 java.io.IOException: EOF

这给我带来了问题。

Solution:

  1. Start emulator (separately) and wait until it is fully loaded.
  2. Open keylock.
  3. Navigate to Eclipse and run your app.

Cause of the problem: Android emulator hasn't loaded all its libraries which handle the installing of a new application and due to that you run into java.io.IOException: EOF

That was causing me the problem.

穿越时光隧道 2024-11-22 22:47:56

你可以试试这个:

   1. Open the "Android Virtual device Manager"
   2. Select from one the listed devices there and run it.
   3. Right click your Android App -> Run As -> Android Application

它对我有用。我在 Eclipse 的模拟器上尝试过这个。
应用程序运行之前需要一段时间。对我来说,花了 33 秒。
等到控制台中显示消息“成功!”

you could try this:

   1. Open the "Android Virtual device Manager"
   2. Select from one the listed devices there and run it.
   3. Right click your Android App -> Run As -> Android Application

It worked for me. I tried this on an emulator in eclipse.
It takes a while before the app is run. For me it took 33 seconds.
Wait until the message in the console says "Success!"

執念 2024-11-22 22:47:56

当它显示红色文字时 - 错误,不要关闭模拟器 - 保持原样并再次运行应用程序。

When it shows the red writing - the error , don't close the emulator - leave it as is and run the application again.

樱花坊 2024-11-22 22:47:56

据我所知,有两种方法可以解决这个问题。

  1. 删除编译后重新生成的.apk,重新测试模拟器。

  2. 删除模拟器并在您的应用程序之外创建新的模拟器。

我认为它有效...如果没有,请检查您的 logCat,它会向您显示实际的错误和信息。尝试解决它......

我希望它对你有帮助......

As per my knowledge there are two ways to solve the problem..

  1. Delete the .apk which regenerate again after the compilation, and test the emulator again.

  2. Delete the emulator and create new emulator besides your app.

I think it work...if not then please check your logCat,which show you the actual error & try to solve it....

I hope it helps to you.........

一腔孤↑勇 2024-11-22 22:47:56

由于编码问题,我遇到了这个问题。要修复,您可以(使用 eclipse 3.6.STS)

  • 右键单击项目,选择属性,选择“资源”(属性屏幕上的第一个选项)
  • 在“文本文件编码”下选择“其他”->“UTF-8”
  • 单击“应用”按钮并继续确定。

项目 -> 清理

项目 -> 运行

.apk 加载正常。

I was getting this problem because of Encoding problems. To fix, you can (using eclipse 3.6. STS)

  • Right click on the Project, select properties, choose "Resource" (first option on my properties screen)
  • Under "Text file encoding" choose Other->UTF-8
  • Click the "Apply" Button and continue with Ok.

Project->Clean

Project->Run

.apk loads fine.

走过海棠暮 2024-11-22 22:47:56

尝试窗口->显示视图->设备->视图菜单->重置 adb 并再次运行应用程序。

Try window->show view->devices->view menu->Reset adb and again run application.

浸婚纱 2024-11-22 22:47:56

解决方案是您必须将超时值更改为至少 15000ms(毫秒),因为毫秒小于秒,它将在一个实例中..无需重新启动。我们应该给模拟器一些时间来上传文件以完成运行。这取决于我们的系统配置。
转到 windows->perspectives->android->DDMS->timeout 到 15000。

这将起作用...如果不起作用,请更改时间。增加堆大小并尝试操纵 Api 最低级别。

the solution is you have to change the time out value to at least 15000ms(milliseconds)as milli is less than seconds, it will be in an instance.. no need of restarting. We should give some time for emulator to upload files for complete run. It depends on our system configurations.
Go to windows->perspectives->android->DDMS->timeout to 15000.

this will work...change the time if it is not working.increase the heap size and try to manipulate the Api minimum level.

℉服软 2024-11-22 22:47:56

我认为您应该删除此 AVD 并为 API-7 创建新的 AVD。如果没有,它会正常工作,请告诉我,我会向您发送更多解决方案。

问候,

In my opinion you should delete this AVD and create new one for API-7. It will work fine if not please let me know I'll send you some more solution.

Regards,

一梦等七年七年为一梦 2024-11-22 22:47:56
  1. 从模拟器中卸载 apk。
  2. 尝试从 Eclipse 再次运行该应用程序。
  3. 请检查最低 Android SDK 版本和版本尝试
    在创建 AVD 管理器的模拟器上运行它。

它肯定会起作用...

  1. Uninstall the apk from the Emulator.
  2. Try to run the appliaction again from Eclipse.
  3. Please check the version for the Minimum Android SDK version & try to
    run it on the Emulator created AVD Manager.

It will Work Definitely...

誰認得朕 2024-11-22 22:47:56

只需关闭 eclipse 和 avd 模拟器并重新启动即可。效果很好

just close the eclipse and avd emulator and restart it. It works fine

青春有你 2024-11-22 22:47:56

我遇到了同样的问题,但我尝试更改 ADB 连接超时。我认为它默认为 5000 毫秒,我将其更改为 10000 毫秒以解决该问题。如果您使用的是 Eclipse,则可以通过 Window -> > 来完成此操作。首选项,然后是Android下的DDMS。

I was facing the same problem but i tried changing the ADB connection timeout. I think it defaults that to 5000ms and I changed mine to 10000ms to get rid of that problem. If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android.

二手情话 2024-11-22 22:47:56

以上都没有帮助我,相反,我通过后置 USB 集线器连接手机(我之前使用过前向 USB 集线器),这对我很有帮助!

Neither above helped me, instead, I connected my phone through the back USB hubs (I used forward USB hubs previously), and this helped me!

娇纵 2024-11-22 22:47:56

就我而言,我使用了选项卡大小(7“)模拟器来测试应用程序。但是它给了我
“无法在设备“emulator-5554”上安装 xxxxx.apk!”并取消启动。

对我来说唯一可行的解​​决方案是将模拟器RAM 大小设置为高位(1512Mb),并将VM 堆大小设置为 36

在那之后它就像魅力一样发挥作用。

谢谢。

In my case I have used a tab size(7") emulator to test the application.But It gave me
"Failed to install xxxxx.apk on device 'emulator-5554! " and launch cancelled.

The only worked solution to me was set the emulator ram size bit high(1512Mb) and VM Heap size to 36.

After that It worked like charm.

Thank You.

护你周全 2024-11-22 22:47:56

adb 非常疯狂,经过几次尝试,我发现我连接了许多设备(模拟器和设备),所以我删除了所有设备,它又恢复工作了

adb is very crazy, after several attempts I found out I was with many devices (emulators and devices) connected , so I removed all devices and it back to work again

余生一个溪 2024-11-22 22:47:56
  • 不要启动android模拟器
  • 右键单击项目>运行为>Android应用程序

然后android模拟器自动启动

现在ok

  • don't start android emulator
  • Right Click on Project>Run As>Android Application

and then android emulator automatically start

now ok

月下客 2024-11-22 22:47:56

我通过重新启动 Eclipse 然后项目 -> 解决了问题构建所有

I solved The problem by restart Eclipse then Project -> build all

盛装女皇 2024-11-22 22:47:56

擦除数据并再次重新启动虚拟设备解决了我的问题。

输入图片此处描述

Wipe Data and restart the virtual device again fix the issue in my case.

enter image description here

残疾 2024-11-22 22:47:56

就我而言,我在设备上安装 apk 期间遇到了以下错误:

  • 同步期间出错:现有连接被远程主机强制关闭

  • 同步期间出错:EOF

  • 无法打开与:localhost/127.0.0.1:5037 的连接,原因是:java.net.ConnectException:连接被拒绝:连接

这导致:

java.io.IOException:EOF

安装 APK 时出错

错误重新启动设备和 adb devices 没有帮助。

我更换了数据线并安装了该apk。

In my case I was getting these errors during installation of an apk on a device:

  • Error during Sync: An existing connection was forcibly closed by the remote host

  • Error during Sync: EOF

  • Unable to open connection to: localhost/127.0.0.1:5037, due to: java.net.ConnectException: Connection refused: connect

That led to:

java.io.IOException: EOF

Error while Installing APK

Restarting a device and adb devices didn't help.

I replaced a data-cable and installed the apk.

烛影斜 2024-11-22 22:47:56

当它发生在我身上时,我通过关闭模拟器并再次运行项目来解决它。

When it happened to me, I solved it by closing the emulator and running the project again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文