我想用下面code访问图像的SD卡上,但我的M获取文件未发现异常。谁能告诉我接取文件???一个正确的方法
新建文件(到/ mnt / SD卡/ splah2.jpg)
解决方案
尝试这样的:
字符串SD_CARD_PATH = Environment.getExternalStorageDirectory()的toString();
新的文件(SD_CARD_PATH +/+splah2.jpg);
I'm trying to access the image on the SD card using below code but I"m getting File not found exception. Can someone tell me a correct way to acess the file???
new File("/mnt/sdcard/splah2.jpg")
解决方案
Try like this:
String SD_CARD_PATH = Environment.getExternalStorageDirectory().toString();
new File(SD_CARD_PATH + "/" + "splah2.jpg");