可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
the project i tried to run is set to minSDK level 7. I have gottan 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 slugguish.
any suggestion or help? Thank you
回答1:
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:
- Run it again. (simply try rerunning it).
- Project->Clean (clean the project plus any projects that it relies on).
- Right click project in the package explorer then close it. Then close Eclipse. Then reopen both.
- Same as the previous step plus Project->Clean.
- Restart the AVD.
- 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.
回答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
回答3:
Solution:
- Start emulator (separately) and wait until it is fully loaded.
- Open keylock.
- 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.
回答4:
you could try this:
1. Open the "Android Virtual device Manager"
2. Select from one the listed devices there and run it.
3. Right 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!"
回答5:
When it shows the red writing - the error , don't close the emulator - leave it as is and run the application again.
回答6:
As per my knowledge there are two ways to solve the problem..
Delete the .apk which regenerate again after the compilation, and test the emulator again.
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.........
回答7:
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.
回答8:
Try window->show view->devices->view menu->Reset adb and again run application.
回答9:
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,
回答10:
- Uninstall the apk from the Emulator.
- Try to run the appliaction again from Eclipse.
- Please check the version for the Minimum Android SDK version & try to
run it on the Emulator created AVD Manager.
It will Work Definitely...
回答11:
just close the eclipse and avd emulator and restart it. It works fine
回答12:
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.
回答13:
Neither above helped me, instead, I connected my phone through the back USB hubs (I used forward USB hubs previously), and this helped me!
回答14:
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.
回答15:
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
回答16:
- don't start android emulator
- Right Click on Project>Run As>Android Application
and then android emulator automatically start
now ok
回答17:
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.
回答18:
I solved The problem by restart Eclipse then Project -> build all
回答19:
When it happened to me, I solved it by closing the emulator and running the project again.