我试图使用此代码,但是什么也没发生。
String content = "hello";
File file;
FileOutputStream oustrong texttputStream;
try {
file = new File(Environment.getExternalStorageDirectory(),"MyCache.txt");
outputStream = new FileOutputStream(file);
outputStream.write(content.getBytes());
outputStream.close();
Toast.makeText(this,"Successss ...", Toast.LENGTH_SHORT).show();
}
catch (IOException e) {
e.printStackTrace();
}