2015-01-26 66 views

回答

1

new File("/sdcard/{file name}.xml").createNewFile()在我的情況下,成功在SD卡上創建一個名爲「{file name} .xml」的文件。

new File(context.getFilesDir() + "/{file name}.xml").createNewFile()在私人應用程序文件區域成功創建這樣的文件。

我使用ADB shell和文件資源管理器檢查了這一切。

+0

謝謝!我將文件創建留給了XML Transformer,它使文件名有點變形。我能夠解決它首先創建一個空的文件與您的答案,然後寫入它。 – chicagozfinest 2015-01-26 22:40:09

相關問題