在小米4和魅族pro5上都试过,还是看不到创建的文件
String FILENAME = "hello_file";
String string = "hello world!";
try{
FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
try{
fos.write(string.getBytes());
fos.flush();
fos.close();
} catch (IOException e) {
Log.e("TextActivity:", "IOException");
e.printStackTrace();
}
} catch (FileNotFoundException e) {
Log.e("TextActivity:", "FileNotFound");
e.printStackTrace();
}
求助!!!
http://www.cppblog.com/guojingjia2006/archive/2012/02/08/165149.aspx
你这直接给个文件名,连路径都没,当然不行