Android: mkdirs()/mkdir() on external storage returns false

I got the same problem,and I am sure I had put the permission tag in the right place,but mkdirs didn’t work yet, my system is Android 6.0, I resolve it now , you can check as below:

  1. make sure your put the permission tag in .
  2. open “setting/application” in your phone,check your application’s permission(I found the permission in my manifest statement is not here),open the switch of the permission like this.(I found it is closed in default which make “mkdirs” failed)

enter image description here

Leave a Comment