尝试在Android中将数据输出到文本文件

威乐1718

我试图输出字符串,并基本上在我的android应用程序中创建一个csv文件是将不同变量输出到文件的代码的屏幕截图。这是输出内容的示例,有人知道我做错了吗?

 android.widget.EditText{683a48d0 VFED..CL .F...... 409,730-661,847 #7f05004e app:id/datetext},

我也试图将其设置为写入外部sd卡,但由于某种原因它会将其写入内部卡。谢谢你的帮助。

styler1972

EditText的方法getText()不返回String,而是Editable

用这个:

EditText et= new EditText();

et.getText().toString(); //This will get you the string, not the serialized object

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章