title: Couldn't find meta-data for provider error
body: <p>I am trying to develop an app that takes photos, and later that uploads them to a database. Right now I am stucked at taking a good quality photo. As I read before, to get a better quality photo you need to save it in your directories. I am following the <a href="https://developer.android.com/training/camera/photobasics#TaskPath" rel="nofollow noreferrer">Google Take Photos</a>
   from developers instructions, and after adding all the methods and provider and so on, I get the error : </p>
  
  <pre><code>Couldn't find meta-data for provider with authority com.example.navigationdrawerfinal. 
  </code></pre>
  
  <p>I've left the name of my app so everyone can see that I changed it in manifest too.</p>
  
  <p>Manifest:</p>
  
  <pre><code>&lt;provider
          android:name="androidx.core.content.FileProvider"
          android:authorities="com.example.navigationdrawerfinal.fileprovider"
          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;
      &lt;meta-data
          android:name="com.google.android.geo.API_KEY"
          android:value="@string/google_maps_key" /&gt;
  </code></pre>
  
  <p>file_paths.xml : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;paths xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;external-path name="my_images" path="Android/data/com.example.navigationdrawerfinal/files/Pictures" /&gt;
  &lt;/paths&gt;
  </code></pre>
  
  <p>and the code where I use it: </p>
  
  <pre><code>private void dispatchTakePictureIntent() {
      Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
      // Ensure that there's a camera activity to handle the intent
      if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
          // Create the File where the photo should go
          File photoFile = null;
          try {
              photoFile = createImageFile();
          } catch (IOException ex) {
              // Error occurred while creating the File
          }
          // Continue only if the File was successfully created
          if (photoFile != null) {
              Uri photoURI = FileProvider.getUriForFile(this,
                      "com.example.navigationdrawerfinal",
                      photoFile);
              takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
              startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);
              poza_neincarcata.setVisibility(View.GONE);
              poza_tick.setVisibility(View.VISIBLE);
          }
      }
  }
  
  
  private File createImageFile() throws IOException {
          // Create an image file name
          String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
          String imageFileName = "JPEG_" + timeStamp + "_";
          File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
          File image = File.createTempFile(
                  imageFileName,  /* prefix */
                  ".jpg",         /* suffix */
                  storageDir      /* directory */
          );
  
          // Save a file: path for use with ACTION_VIEW intents
          currentPhotoPath = image.getAbsolutePath();
          return image;
      }
  </code></pre>