使用 Eclipse DDMS 将大文件推送到模拟器/SD 卡时出现问题
我正在使用 Eclipse DDMS 将文件推送到我的 Android 模拟器 sdcard 上。我选择文件并按“打开”,会弹出一个对话框并开始推送文件。在 DDMS 透视图的“文件资源管理器”视图中,我可以看到 sdcard 目录并可以看到在其中创建的文件。然后在弹出窗口中,进度表进行到一半,然后我在控制台窗口中收到此错误:
[2011-09-22 15:15:56] Failed to push the item(s).
[2011-09-22 15:15:56] (null)
然后文件资源管理器完全刷新并且文件消失。我知道SD卡设置为1G空间,而我推送的文件只有9M。
以下是推送期间和失败后的图像。
那么我做错了什么或者我需要做什么来解决这个问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这是修复它的方法。我有一个大约 160M 的大文件,所以发生的情况很可能是超时。因此,为了解决这个问题,我进入了 Eclipse Windows ->首选项->安卓->然后,我将 DDMS 设置 ADB 连接超时为 500000,并选中“启用线程更新”并选中“启用堆更新”。然后我能够将任何文件大小推送到 SD 卡。阅读此内容后我得到了这个想法 thread
在我的某些情况下重新启动 IDE不需要。
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.
我知道这个问题已经得到解答和接受 - 但我用不同的方式解决了这个问题。
有时,我不太确定“为什么”,但 ADB 需要重置。
当您的模拟器正在运行时,请执行以下操作:
现在,只要您的 SD 卡设置为可以处理的大小,您就应该能够将文件正常推送到系统上。
希望这对某人有帮助!
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:
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!
无法添加评论,所以我想我必须将其添加为答案。如果您尝试执行 adb Push filename /mnt/sdcard/ftp/new/ ,它会起作用吗?
如果这也不起作用,请尝试在 adb 上执行终止服务器和启动服务器,也许会起作用。
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.
您可以使用 PassMark OSMount 将文件上传到 SD 卡映像 - 只需以读/写模式安装卡映像,它就会在 Windows 中显示为硬盘。也比通过 adb/ddms 上传快得多
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
只需重新启动您的 eclipse IDE。它就会完美运行。
Just restart the your eclipse IDE.It will work perfectly.