can't create folder in /mnt/sdcard
<p>I think I'm doing everything right to first create a folder
that I can write to later in my app, but it doesn't seem to be working.
Any clues as to how I've failed?</p>

<p>It correctly tries to create /mnt/sdcard/gradebook</p>

<p>I have uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
in my manifest. I'm running on a real device (Samsung Galaxy S) and I'm not using the
sdcard as storage while its attached to my computer.</p>

<pre><code>    boolean mExternalStorageAvailable = false;
    boolean mExternalStorageWriteable = false;
    String state = Environment.getExternalStorageState();

    if (Environment.MEDIA_MOUNTED.equals(state)) {
        // We can read and write the media
        mExternalStorageAvailable = mExternalStorageWriteable = true;
    } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
        // We can only read the media
        mExternalStorageAvailable = true;
        mExternalStorageWriteable = false;
        Toast.makeText(this,"This Application needs a writable external storage (sdcard).",Toast.LENGTH_SHORT).show();
        finish();
    } else {
        // Something else is wrong. It may be one of many other states, but all we need
        //  to know is we can neither read nor write
        mExternalStorageAvailable = mExternalStorageWriteable = false;
        Toast.makeText(this,"This Application needs a mounted external storage (sdcard).",Toast.LENGTH_SHORT).show();
        finish();

    }


    File folder = new File(Environment.getExternalStorageDirectory () + "/gradeBook");
    boolean success = false;
    if(!folder.exists()){
         success = folder.mkdir();
    }
    if (!success) {
        Log.e("FILE", "can't create " + folder);
    }
    else 
    {
        Log.i("FILE", "directory is created"); 
    }
</code></pre>

<p>Here is the manifest</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.ulsanonline.gradebook" 
    android:versionName="@string/version" 
    android:installLocation="auto" 
    android:versionCode="2"&gt;
    &lt;uses-sdk android:minSdkVersion="8"&gt;&lt;/uses-sdk&gt; 
    &lt;application 
        android:icon="@drawable/icon" 
        android:debuggable="true" 
        android:persistent="false" 
        android:hasCode="true"
        android:minSdkVersion="8"&gt;
        &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
        &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
        &lt;activity 
            android:name=".CourseWork" 
            android:label="@string/app_name" 
            android:screenOrientation="portrait"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
</code></pre>
