在Android studio 里面想要写入文本内容怎么做
在 AndroidManifest.xml 文件中添加写入外部存储的权限。如果是 Android 6.0(API 级别 23)及以上的系统,还需要在运行时请求权限。


在 MainActivity 的 writeToFile 方法里调用 FileHelper 类:
private void writeToFile(String content) {
FileHelper.writeToInternalStorage(this, content, "example.txt");
}

浙公网安备 33010602011771号