The error message "Manifest merger failed: uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library" indicates a conflict between the minSdkVersion specified in your app's AndroidManifest.xml file and the minSdkVersion declared in one of the libraries you are using.

To resolve this issue, you have a few options:

  1. Increase your app's minSdkVersion: If your app can support a higher minimum SDK version, you can update the minSdkVersion in your app's build.gradle file to a value higher than 22. Open the build.gradle file located in your app module directory and find the minSdkVersion line. Update it to a value greater than or equal to 22:

    android { // ... defaultConfig { // ... minSdkVersion 22 // ... } // ... }

    After making this change, rebuild your app.

  2. Update the library: If the library causing the conflict has a newer version available that supports a lower minSdkVersion, you can update the library to that version. Check the library's documentation or release notes to determine if a higher version is available that supports your desired minSdkVersion.

  3. Remove or find an alternative library: If neither of the above solutions is feasible, you may need to remove the conflicting library or find an alternative library that supports your desired minSdkVersion.

It's important to note that changing the minSdkVersion can have implications on the compatibility and functionality of your app on older devices. Make sure to thoroughly test your app on various devices and Android versions to ensure it works as expected.

Once you have resolved the conflict, the manifest merger issue should be resolved, and you can proceed with building and running your app.

Have questions or queries?
Get in Touch