内部存储文件夹和文件
答
试试以下,
File path=getFilesDir();
String mypath=path.toString() + "/myfolder";
OutputStreamWriter out;
try {
File f = new File(mypath , "/myfile.txt" );
out = new OutputStreamWriter(openFileOutput(f.getPath(),MODE_PRIVATE));
out.write("test");
out.close();
}
答
您需要下列权限在您的应用程序
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />