我想在android项目的文本文件(使用Eclipse)中编写一个字符串行。这是我正在尝试的代码,但它不工作...如何在Android中写入外部文本文件?
String s="hello azeem\n";
try{
FileOutputStream fos = openFileOutput("C:\\eventslog.txt", Context.MODE_PRIVATE);
fos.write(s.getBytes());
fos.close();
}
catch (Exception e){
}
任何想法??
20分钟前你的帖子有重复,[如何写入Android的外部文本文件?](http://stackoverflow.com/questions/5844476/how-to-write-to-an-external-text -file功能于机器人)。请不要转发;改为用澄清来编辑您的原始问题。 – 2011-04-30 21:03:01
请告诉我解决方案,如果你有...我更好地考虑做出新的职位,这里清楚地描述了这个问题。 – Azeem 2011-04-30 21:07:52