Android FileProvider class not found in release builds
<p>I'm using a FileProvider to get photos from the device. The implementation works just fine in debug builds (minifyEnabled false) but when I'm building the release build (minifyEnabled true) I get an error:</p>

<pre><code>java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: 
java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" 
on path: DexPathList[[zip file "/data/app/com.package.name-2/base.apk"],
nativeLibraryDirectories=[/data/app/om.package.name-2/lib/arm, /vendor/lib, /system/lib]]
</code></pre>

<p>So I guess this has someting to do with the proguard setup</p>

<p>I have </p>

<pre><code>compile 'com.android.support:support-v13:23.1.1'
</code></pre>

<p>which is a superset of v4 in my gradle file and</p>

<pre><code>minSdkVersion 21
targetSdkVersion 23
</code></pre>

<p>and</p>

<pre><code>-keep class android.support.v4.app.** { *; }
-keep class android.support.v4.content.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep interface android.support.v4.content.** { *; }
-keep class * extends android.content.ContentProvider
</code></pre>

<p>in my proguard-rules.pro file </p>

<p>I have tested with both Android 5 and 6 and same thing happens.
Any suggestion would be usefull, thanks in advance.</p>