java.lang.SecurityException: MODE_WORLD_READABLE no longer supported

后端 未结 1 2016
[愿得一人]
[愿得一人] 2020-12-09 16:09

The exception only occurs in Android 7.0 Nougat (emulator) devices.

java.lang.SecurityException: MODE_WORLD_READABLE no longer supported

相关标签:
1条回答
  • 2020-12-09 16:54

    World-readable files can be a security flaw. So android first deprecated it and then completely removed it. MODE_WORLD_READABLE was deprecated in versions till Android M. But in Android N it is no longer supported and throws SecurityException. So try a different mode. I used Context.MODE_PRIVATE and it worked.

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