2011-09-05 39 views
2

下面一行java.io.FileNotFoundException與FileWriter的

FileWriter fw = new FileWriter("/log0.txt"); 

拋出:
java.io.FileNotFoundException: /log0.txt (Read-only file system)

我的設備和 「USB存儲」 測試,這是關閉。任何想法爲什麼發生這種情況

+2

試試這個線程的答案:http://stackoverflow.com/questions/5315560/read-only-error-when-saving-image-from-url-in-android – nhaarman

回答

0

確保log0.txt存在於您的設備中。其他明智的例外

+0

FileWriter創建文件,如果它不'不存在 – Caner

0

Here是一個教程,這開始描述你的問題。閱讀會有幫助。