FileNotFoundException (permission denied) when trying to write file to sdcard in Android

后端 未结 1 447
轻奢々
轻奢々 2020-12-20 11:08

As you can notice from title, I have a problem with writing file to sdcard in Android. I\'ve checked this question but it didn\'t help me. I want to write file that will be

相关标签:
1条回答
  • 2020-12-20 11:39
    1. Everything works fine with writing files to private folder on sdcard

    Beginning with Android 4.4, these permissions are not required if you're reading or writing only files that are private to your app. For more information, see saving files that are app-private.

    1. FileNotFoundException (permission denied) when trying to write file to sdcard in Android

    As you are trying to write the file in emulator having API 23(Marshmallow), You need to Request WRITE_EXTERNAL_STORAGE permission at runtime also. Check this and this for more detail.

    0 讨论(0)
提交回复
热议问题