Problem Pushing Large File to Emulator/SDcard with Eclipse DDMS

不羁的心 提交于 2020-01-12 18:51:29

问题


I am using Eclipse DDMS to push a file over onto my Android Emulator sdcard. I select the file and press Open, a dialog pops up and starts pushing the file. In the view "File Explorer" in the DDMS perspective I can see the sdcard directory and can see my file created in it. Then in the popup the progress meter gets halfway then I get this error in the Console window:

[2011-09-22 15:15:56] Failed to push the item(s).
[2011-09-22 15:15:56] (null)

Then the File Explorer completely refreshes and the file disappears. I know the sdcard is setup for 1G of space and the file I am pushing is only 9M.

Here are images during push and after fail.

So what am I doing wrong or what do I need to do to fix this?


回答1:


Here is the way you fix it. I had a large file about 160M so what was happening it was most likely timing out. So to fix this I went to the Eclipse Windows -> Preferences -> Android -> DDMS then I set the ADB connection time out to 500000 and checked "Thread updates enabled" and checked Heap updates enabled". I was then able to push any file size up to the sdcard. I got the idea after reading this thread

Restart the IDE in some cases in mine I didn't need to.




回答2:


I know the question is already answered and accepted - but I solved this problem a different way. Sometimes, I'm not quite sure "why" but the ADB needs to be reset.

When your emulator is running, do the following:

  1. Go to DDMS
  2. Go to Devices under DDMS
  3. Select your running emulator so that its highlighted.
  4. In the top right hand corner of your devices screen there's a little "down arrow". Click it
  5. Hit the reset ADB option and do not be alarmed by the force quit red text in console window.

You should now be able to push files onto the system fine, as long as your SD card is set to a size that can handle it.

Hope this helps someone!




回答3:


Can't add a comment so I guess I have to add this as an answer. Does it work if you try doing adb push filename /mnt/sdcard/ftp/new/ ?

If that doesn't work either, try doing a kill-server and start-server on the adb and maybe that'll work.




回答4:


you can upload files to sdcard image using PassMark OSMount - just mount card image in read/write mode and it appears as harddisk in windows. Also much faster than uploading via adb/ddms




回答5:


Just restart the your eclipse IDE.It will work perfectly.



来源:https://stackoverflow.com/questions/7521122/problem-pushing-large-file-to-emulator-sdcard-with-eclipse-ddms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!