Android Eclipse 控制台显示:“无法推送选择:只读文件系统”当我尝试推送文件时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11144916/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse console shows:'Failed to push selection: Read-only file system'when i try to push a file
提问by Amel Jose
I am trying to push a file to the SD Card but its showing error in console 'failed to push selection: Read-only file system'.I am using DDMS perspective in Eclipse.I generated sdcard using mksdcard command.
我正在尝试将文件推送到 SD 卡,但它在控制台中显示错误“无法推送选择:只读文件系统”。我在 Eclipse 中使用 DDMS 透视图。我使用 mksdcard 命令生成了 sdcard。
回答by Amel Jose
Just go to
就去
C:\Documents and Settings\<adminstrator>\.android\avd
C:\Documents and Settings\<adminstrator>\.android\avd
take 'properties'
of your avd folder (there is a folder for each of the avd's)
取出'properties'
您的 avd 文件夹(每个 avd 都有一个文件夹)
uncheck 'Read only'
-> OK
取消选中'Read only'
-> 确定
This was the only thing that worked for me.
这是唯一对我有用的东西。
P.S: Some of these folders might be hidden.
PS:其中一些文件夹可能是隐藏的。
回答by IronBlossom
On the Terminal
or Command-Prompt
, write these( for me its command prompt):
在Terminal
or 上Command-Prompt
,写下这些(对我来说是命令提示符):
adb shell
(Opens the device shell. you'll see a#
)su
(get the root permission, if necessary)mount -o rw,remount rootfs /
(remount the root file system.)chmod 777 /mnt/sdcard
(change the permission of the sdcard to rwe.)exit
adb shell
(打开设备外壳。你会看到一个#
)su
(如有必要,获取 root 权限)mount -o rw,remount rootfs /
(重新挂载根文件系统。)chmod 777 /mnt/sdcard
(将sdcard的权限改为rwe。)exit
If it doesn't work, try to push the file from the same shell using adb push
.
Hope this help.
如果它不起作用,请尝试使用adb push
. 希望这有帮助。
回答by MKJParekh
You need to give SDCard support to your AVD and mount the SDCard.
您需要为您的 AVD 提供 SDCard 支持并安装 SDCard。
First go to 'AVD Manager and select your AVD then Click on Edit and in the Hardware add SDCard Support'.
首先转到“AVD 管理器并选择您的 AVD,然后单击编辑并在硬件中添加 SDCard 支持”。
Please check this linkfor complete detailed step to achieve SDCard support and mounting.
请查看此链接以获取实现 SDCard 支持和安装的完整详细步骤。
You can also give a try to this command in CMD, this will remount your SDCard.
您也可以在 CMD 中尝试此命令,这将重新安装您的 SDCard。
c:\android-sdk\platform-tools\>adb remount
回答by L.Sidhu
I was also facing same issue :
我也面临同样的问题:
Failed to push selection: Read-only file system
推送选择失败:只读文件系统
In computers with higher configuration(beyond Windows XP)
settings like ---> C:\Documents and Settings\.android\avd
doesn't exist so instead
go to this path --> C:\Users\.android and right click on this folder and uncheck the box having name as read only.
在具有更高配置(Windows XP 以外)的计算机中,诸如 ---> C:\Documents and Settings\.android\avd 之类的设置
不存在,因此请转到此路径 --> C:\Users\.android 并右键单击并取消选中名称为只读的框。
Hope this helps those with newer windows on their pc :) , if this solution helps you than please vote for it.
希望这可以帮助那些在他们的电脑上安装新窗口的人:),如果这个解决方案对你有帮助,请投票支持它。
回答by afra mehrparvar
if some one have same problem in new build of studio . 0.8.9 and above see my solution here and it will work like a charm : (afra mehrparvar solution in the bottom of the page )
如果有人在新建的工作室中遇到同样的问题。0.8.9 及更高版本在此处查看我的解决方案,它将像魅力一样工作:(页面底部的 afra mehrparvar 解决方案)
回答by Kamal Trivedi
In my case i have mistake with the slash. while specifying "Additional Emulator Command Line Options" in eclipse
就我而言,我对斜杠有误。在 Eclipse 中指定“附加模拟器命令行选项”时
Actually it should be -sdcard C:/Kamal/sdcard/emulator_sdcard
其实应该是 -sdcard C:/Kamal/sdcard/emulator_sdcard
and i was putting -sdcard C:\Kamal\sdcard\emulator_sdcard
我把 -sdcard C:\Kamal\sdcard\emulator_sdcard
Then after restarting the Eclipse & Emulator it works.
然后在重新启动 Eclipse & Emulator 后它就可以工作了。
回答by Exceptional
If the data in the sd card is not updated in the emulator or in the app which you are developing then, Select, Dev Tools->Media Scanner The data which has been already pushed into the sd card by variant means will get loaded soon.!
如果在模拟器或您正在开发的应用程序中没有更新sd卡中的数据,则选择,Dev Tools->Media Scanner已经通过变体方式推送到sd卡中的数据将很快加载。 !