0
我正在研究將XML文件寫入設備的方法。我已經在清單文件中允許外部存儲,但是我無法在它應該在的位置找到該文件。Android:找不到生成的XML文件
這裏是我的代碼:
public static void write(){
Serializer serial = new Persister();
File sdcardFile = new File("/Prueba/file.xml");
Item respuestas = new Item();
try {
serial.write(respuestas, sdcardFile);
} catch (Exception e) {
// There is the possibility of error for a number of reasons. Handle this appropriately in your code
e.printStackTrace();
}
Log.i(TAG, "XML Written to File: " + sdcardFile.getAbsolutePath());
}
}
謝謝你現在的工作 – Katherine99 2013-02-26 09:50:39