我有这段代码:
protected String doInBackground(String... params) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
FileInputStream fis;
try {
File F = new File(FilePath);
fis = new FileInputStream(F);
du.Upload(fis,Fname);
} catch (Exception e) {
e.printStackTrace();
}
}
fis
正在生成以下错误:
`java.io.FileNotFoundException: /storage/emulated/0/When We Are Young(AnyMaza.Com).mp3: open failed: EACCES (Permission denied)`
FilePath
是这样的:
/storage/emulated/0/When We Are Young(AnyMaza.Com).mp3
我在应用程序清单中添加了读写权限:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
.....
<application
.....
可能是什么问题?
任何帮助表示感谢。