title: Problem to create directory in Android
body: <p>I'm developing a simple application for Android devices.</p>
  
  <p>I need to create a directory, but I can't do it.</p>
  
  <pre><code>File folder = new File(Environment.getExternalStorageDirectory ()+"/dir");
  
  if(folder.mkdirs()){
     CrearToast("Directorio creado"); //successfully created
  }else{
     CrearToast("fallo"); // error creating directory
  }
  </code></pre>
  
  <p>*CrearToast creates a toast with the text in brackets.</p>
  
  <p>I have set 
      uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"</p>