Android模拟器 - 任何可访问的存储空间? [英] android emulator - any accessible storage space?

查看:286
本文介绍了Android模拟器 - 任何可访问的存储空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到

java.io.FileNotFoundException: /sdcard/Img_1316563834614.jpg (Permission denied)

尝试后

mRAF = new RandomAccessFile(mFullPath, "rws");

在这里mFullPath是/sdcard/image6456.jpg,/mnt/sdcard/image3579.jpg,文件:///sdcard/image34567.jpg等没有什么工作。已经有一个

where mFullPath was /sdcard/image6456.jpg, /mnt/sdcard/image3579.jpg, file:///sdcard/image34567.jpg, etc. Nothing works. There is already an

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

在AndroidManifest.xml行

line in AndroidManifest.xml

我已签,路径到/ mnt / SD卡实际上是在那里。同时通话

I have checked that the path /mnt/sdcard is actually there. Also the call

getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);

给出了空。我不应该怀疑,虽然...

gives out null. I should not wonder though...

我是什么失踪?

感谢

推荐答案

模拟器不来与外部存储,除非你定义一些在AVD。请参阅添加Android虚拟设备或编辑Android虚拟设备对话框中的SD卡组框:

The emulator does not come with external storage, unless you define some in the AVD. See the "SD Card" group box in the Add Android Virtual Device or Edit Android Virtual Device dialogs:

在这其中,我定义外部存储32MB。默认情况下,大小字段为空,这意味着没有外部存储。

In this one, I defined 32MB of external storage. By default, the Size field is blank, meaning no external storage.

这篇关于Android模拟器 - 任何可访问的存储空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆