Why don't I have permission to write to app dir on external storage?
问题 The TL;DR question summary: My Android app tries to write to the app's external storage directory on an SD card. It fails with a permissions error . But the same code (method), extracted into a minimal test app, succeeds! Since our target API level includes KitKat and later (as well as JellyBean), and KitKat restricts apps from writing anywhere on the SD card except the app's designated external storage directory, the app tries to write to that designated directory, /path/to/sdcard/Android