开发者

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

The project I tried to run is set to minSDK level 7. I have gotten the above error message whe开发者_如何学Pythonn 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


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.


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


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.


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!"


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


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.........


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.


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


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.


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,


  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...


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


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.


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


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.


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


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

and then android emulator automatically start

now ok


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


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

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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜