title: android File.mkdirs() always return false
body: <p>I want make directory and file in device.</p>
  
  <p>but when File.mkdirs() always return false...
  I don't know why!</p>
  
  <p>I even have added permission in manifest like this :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="pkg.pkg.pkg"&gt;
  
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt;
      &lt;application
  ....
  </code></pre>
  
  <p>and this is my code :</p>
  
  <pre><code>File directory = null;
  File file = null;
  String dir = "";
  String folderName = "test";
  
  String sdcard = Environment.getExternalStorageState();
  
  if(sdcard.equals(Environment.MEDIA_MOUNTED)){
      dir = Environment.getExternalStorageDirectory().getAbsolutePath();
  } else {
      dir = Environment.getRootDirectory().getAbsolutePath();
  }
  
  directory = new File(dir, folderName);
  
  if(!directory.exists()) {
      directory.mkdirs(); // return false here.
  }
  
  if(directory.isDirectory()){
  
      file = new File(directory.getAbsolutePath(), fileName);
      if(file.exists()){
          String tempFileName = et_export.getText().toString();
  
          // Check duplicate file name
          for(int i=1;;i++){
              fileName = tempFileName + " (" + i + ").png";
              file = new File(directory.getAbsolutePath(), fileName);
              if(!file.exists()) break;
          } // for
  
      } // if(file.exists())
  
  } // if(directory.isDirectory())
  </code></pre>
  
  <p>What's the problem...?</p>