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

AndroidFailed Installation

Android Problem Overview


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 https://stackoverflow.com/questions/1554099/slow-android-emulator to get it fixed. Yesterday, it was working pretty well. Now it is so sluggish.

Any suggestion or help? Thank you

Android Solutions


Solution 1 - Android

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.

Solution 2 - Android

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 3 - Android

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.

Solution 4 - Android

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

Solution 5 - Android

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

Solution 6 - Android

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

Solution 7 - Android

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.

Solution 8 - Android

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

Solution 9 - Android

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.

Solution 10 - Android

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,

Solution 11 - Android

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

Solution 12 - Android

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

Solution 13 - Android

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.

Solution 14 - 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!

Solution 15 - Android

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.

Solution 16 - Android

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

Solution 17 - Android

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

and then android emulator automatically start

now ok

Solution 18 - Android

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

Solution 19 - Android

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

enter image description here

Solution 20 - Android

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.

Solution 21 - Android

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionThomasView Question on Stackoverflow
Solution 1 - AndroidLokiareView Answer on Stackoverflow
Solution 2 - AndroiddmottaView Answer on Stackoverflow
Solution 3 - AndroidIndrek KõueView Answer on Stackoverflow
Solution 4 - AndroidambayView Answer on Stackoverflow
Solution 5 - AndroidlokokoView Answer on Stackoverflow
Solution 6 - AndroidShaileshView Answer on Stackoverflow
Solution 7 - AndroidRon WertlenView Answer on Stackoverflow
Solution 8 - AndroidAnilPatelView Answer on Stackoverflow
Solution 9 - AndroidgrayhatView Answer on Stackoverflow
Solution 10 - AndroidCool Java guy מוחמדView Answer on Stackoverflow
Solution 11 - AndroidMainank BrahmbhattView Answer on Stackoverflow
Solution 12 - AndroidAbhinaiView Answer on Stackoverflow
Solution 13 - AndroidAsteriskiiiiView Answer on Stackoverflow
Solution 14 - AndroidazizbekianView Answer on Stackoverflow
Solution 15 - AndroidBaxterView Answer on Stackoverflow
Solution 16 - AndroidGilianView Answer on Stackoverflow
Solution 17 - AndroidKyaw Zin HtunView Answer on Stackoverflow
Solution 18 - AndroidTareq GhanemView Answer on Stackoverflow
Solution 19 - Androidli2View Answer on Stackoverflow
Solution 20 - AndroidCoolMindView Answer on Stackoverflow
Solution 21 - AndroidJulián SosaView Answer on Stackoverflow