title: Exception Attempt to invoke virtual method
body: <p>I am trying to setup FileProvider and i'm encountering a lot of problems. The latest is the following exception:</p>
  
  <pre><code>java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
  </code></pre>
  
  <p>My FileProvider looks like this:</p>
  
  <pre><code>&lt;provider
          android:name="android.support.v4.content.FileProvider"
          android:authorities="com.example.jernej.fileprovider"
          android:exported="false"
          android:grantUriPermissions="true"&gt;
          &lt;meta-data
              android:name="android.support.FILE_PROVIDER_PATHS"
              android:resource="@xml/paths" /&gt;
      &lt;/provider&gt;
  </code></pre>
  
  <p>My path xml file looks like this:</p>
  
  <pre><code>&lt;paths xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;files-path name="csv_file" path="files/"/&gt;
  &lt;/paths&gt;
  </code></pre>
  
  <p>And the in the MainActivitiy i use this code to pass the file to the intent</p>
  
  <pre><code>File exportDir = new File(getFilesDir(), "");
  File file = new File(exportDir, "meritve.csv");
  File pot=new File(file.getAbsolutePath());
  Uri uri = FileProvider.getUriForFile(MainActivity.this, "com.example.jernej", pot);
  
  Intent sendIntent = new Intent(Intent.ACTION_SEND);
      sendIntent.setType("text/csv");
      sendIntent.putExtra(Intent.EXTRA_EMAIL, "mail.example@gmail.com");
      sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
          sendIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
  startActivity(Intent.createChooser(sendIntent, "Send E-mail..."));
  </code></pre>
  
  <p>I have no idea if I even set up the FileProvider correctly. The file is in the directory /data/data/com.example.jernej.glukozko/files</p>
  
  <p>Please help</p>