我尝试在我的类中将字符串写入文件,扩展 AsyncTask:
protected void onPostExecute(String result) {
super.onPostExecute(result);
DataOutputStream out = null;
try {
out = new DataOutputStream(openFileOutput("1xdf.xml", Context.MODE_PRIVATE));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
for (int i=0; i<20; i++) {
try {
out.writeUTF(Integer.toString(i));
} catch (IOException e) {
e.printStackTrace();
}
}
try {
out.close();
Log.e(DEBUG_TAG, "6x");
} catch (IOException e) {
e.printStackTrace();
}
}
在 DDM 中哪里可以找到此文件?当我尝试搜索-> 文件 1xdf.xml 时,我得到
文本搜索过程中遇到的问题。文件 'MainActivity/bin/jarlist.cache' 已被跳过,读取时出现问题:('资源与文件系统不同步:'/MainActivity/bin/jarlist.cache'。')。资源与文件系统不同步:“/MainActivity/bin/jarlist.cache”。