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());
}
}