java.io.FileNotFoundException: (Permission denied) Only in Oreo
问题 I am downloading photos to smartphone. For versions lower than Oreo, there's no problem. But for Oreo, my code isn't not working. I tried this code in Emulator: I implemented a function to save an image to external storage. private void saveImageToExternalStorage(Bitmap finalBitmap,String name) { String root = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString(); File myDir = new File(root + "/xx"); myDir.mkdirs(); String fname = name + ".jpg"; File file =