title: Convert file: Uri to File in Android
body: <p>What's the easiest way to convert from an <code>android.net.Uri</code> object which holds a <code>file:</code> type to a <code>File</code> object in Android?</p>
  <p>I tried the following but it doesn't work:</p>
  <pre class="lang-java prettyprint-override"><code>File file = new File(Environment.getExternalStorageDirectory(), &quot;read.me&quot;);
  Uri uri = Uri.fromFile(file);
  File auxFile = new File(uri.toString());
  assertEquals(file.getAbsolutePath(), auxFile.getAbsolutePath());
  </code></pre>