我从手机存储中读取了一些文件(用俄语命名),我列出了所有文件,它将为我提供所有文件路径正确,但是当我尝试从中读取new FileInputStream(file)
文件时,却找不到文件异常,我不知道为什么。我的代码如下:
FileInputStream file1 = new FileInputStream(file); //this line gave error and file path is /storage/emulated/0/bhanuдосвидания.txt
和logcat是以下内容:
02-10 15:48:58.000: W/System.err(16013): java.io.FileNotFoundException: /storage/emulated/0/bhanuдосвидания.txt: open failed: ENOENT (No such file or directory) 02-10 15:48:58.020: W/System.err(16013): at libcore.io.IoBridge.open(IoBridge.java:409) 02-10 15:48:58.050: W/System.err(16013): at java.io.FileInputStream.<init>(FileInputStream.java:78) 02-10 15:48:58.050: W/System.err(16013): at com.S3Upload.UploadActivity$allCalculation.doInBackground(UploadActivity.java:1671) 02-10 15:48:58.080: W/System.err(16013):
请帮我...
可能是问题出在您将文件名更改为小写。尝试从代码中删除小写字母并进行检查。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句