Android10以后,读写文件权限与之前不一样,APP保存在文件根目录中的文件可能无法访问,暂时解决方式如下:
在AndroidManifest.xml
的application
节点下
增加android:requestLegacyExternalStorage="true"
即可
具体信息参考Google开发者文档
https://developer.android.com/training/data-storage/files/external-scoped#work-with-other-apps-files