调用android的保存文件功能,出现android java.io.IOException: open failed: EROFS (Read-only file system)

解决方法:

Because you are trying to write the file to root, you need to pass the file path to your file directory.

Example

String filePath = context.getFilesDir().getPath().toString()+"/fileName.txt";File f =newFile(filePath);

更多相关文章

  1. Android(安卓)Preference置灰显示
  2. android Timer的用法实例
  3. Android(安卓)利用发送Intent播放本地视频和网络视频
  4. 我的android 第15天 -使用SQLiteOpenHelper获取用于操作数据库的
  5. Android横屏竖屏切换的问题
  6. Android——启动过程详解
  7. ClassCastException android.view.viewgroup.$layoutParam
  8. Android中拍照、图片、录音、视频和音频功能的方法和代码
  9. Android实现发送短信功能实例详解

随机推荐

  1. Android 输入法键盘和activity页面遮挡问
  2. Android 绘制中国地图及热点省份分布
  3. android 7和android8在user版本下能应用
  4. Android(安卓)NDK standlone编译脚本
  5. Android skia 和open skia的比较
  6. 通过 Android SDK Manager 安装面向 Andr
  7. 常用的布局和View常用属性
  8. Android应用程序开发的五大概念
  9. Eclpise导入android SDK自带的API demos
  10. Android(安卓)json 解析