如下所示:
public static void stringTxt(String str){ try { FileWriter fw = new FileWriter("/sdcard/aaa" + "/cmd.txt");//SD卡中的路径 fw.flush(); fw.write(str); fw.close(); } catch (Exception e) { e.printStackTrace(); } }
上一篇:微信小程序怎么实现input输入框
下一篇:如何在Android中实现蓝牙聊天