Trying to save a file but getting "Parent directory of file does not exist" even after trying to create dir
<p>I'm trying to save an image to my sdcard but running into the following error:</p>

<pre><code>java.io.IOException: Parent directory of file does not exist: /sdcard/skdyImages/a46e2e08-9154-4fe7-96e8-2af0a7a92867.jpg
</code></pre>

<p>I do have the permissions in my manifest </p>

<pre><code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
</code></pre>

<p>Here is my code:</p>

<pre><code>String newName = UUID.randomUUID().toString();
            Bitmap bmp = ImageLoader.getInstance().getBitmap(e.getUrl());
            File file = new File("/sdcard/skdyImages", newName + ".jpg");
            file.getParentFile().mkdirs();
            file.createNewFile();
            BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
            bmp.compress(CompressFormat.JPEG, 90, out);
            out.flush();
            out.close();
</code></pre>

<p>Any ideas?</p>
