Android: FileProvider "Failed to find configured root"
<p>I'm trying to use FileProvider to share a SQL database file via email. </p>

<p>Error:</p>

<pre><code>java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.columbiawestengineering.columbiawest/databases/testresults.db
</code></pre>

<p>My code:</p>

<pre><code>&lt;paths xmlns:android="http://schemas.android.com/apk/res/android"&gt;
&lt;files-path name="test_results" path="databases/"/&gt;
&lt;/paths&gt;
</code></pre>

<p>Manifest.xml:</p>

<pre><code>    &lt;provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="com.columbiawestengineering.columbiawest"
        android:exported="false"
        android:grantUriPermissions="true"&gt;
        &lt;meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/file_paths" /&gt;
    &lt;/provider&gt;
</code></pre>

<p>Java.code:</p>

<pre><code>    File goob = this.getDatabasePath("testresults.db");
    Log.d("LOG PRINT SHARE DB", "File goob..? getDatabasePath.. here it is: " + goob.toString());

    Uri contentUri = FileProvider.getUriForFile(this, "com.columbiawestengineering.columbiawest", goob);
    Log.d("LOG PRINT SHARE DB", "contentUri got: here is contentUri: " + contentUri.toString());
</code></pre>

<p>Also, Logcat for goob shows the correct db location:</p>

<pre><code>....../com.columbiawestengineering.columbiawest D/LOG PRINT SHARE DB: File goob..? getDatabasePath.. here it is: /data/data/com.columbiawestengineering.columbiawest/databases/testresults.db
</code></pre>

<p>Any help?</p>

<p>From developer.android, it appears that the xml files-path... represents the files/ subdirectory. But that is not where the file is stored. I'm at a loss. </p>