Android问题集锦之一
最后更新于:2022-04-01 06:37:46
##android java.io.IOException: Parent directory of file is not writable: /sdcard/...
今天遇到这个错误,第一反应就是权限问题,搜索了下,
找到和WRITE相关的permission有以下几个:
~~~
WRITE_CALENDAR "android.permission.WRITE_CALENDAR"
WRITE_CONTACTS "android.permission.WRITE_CONTACTS"
WRITE_OWNER_DATA "android.permission.WRITE_OWNER_DATA"
WRITE_SETTINGS "android.permission.WRITE_SETTINGS"
WRITE_SMS "android.permission.WRITE_SMS"
WRITE_SYNC_SETTINGS "android.permission.WRITE_SYNC_SETTINGS"
~~~
试过了都不行,
后来一看,还有个权限我没看到,那就是WRITE_EXTERNAL_STORAGE。这次好用了。