不能读/写的Android到SD卡 [英] Can't read/write to sdcard in Android
本文介绍了不能读/写的Android到SD卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以在问题的任何一个帮助
Can any one help in that problem
当我尝试code
File routesRoot = Environment.getExternalStorageDirectory();
if (!routesRoot.canWrite())
System.out.println("can't write root");
if (!routesRoot.canRead())
System.out.println("can't read root");
在运行的程序都不能写/读occure
when run program both can't write /read occure
我已经设置权限访问SD卡是什么问题?
I have set permission to access sdcard what is the problem ??
推荐答案
你在你的manifest.xml ??
Do you have this in your manifest.xml??
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
在Android SDK版本4,你有你的清单文件授予的权限指定。
From android SDK ver 4, you have to specify this in your manifest file to give the permissions.
这篇关于不能读/写的Android到SD卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文