'Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library
I am using instamojo payment library in my project version 3.4.0 compile 'com.instamojo:android-sdk:3.4.0'
when i change min Sdk version from 21 to 19, it is showing me following error
things i have done change minSdkVersion 19 (in build.gradle app), then sync, then sync all project gradle files, rebuilt project invalid caches and restart
Any help will be valuable
Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [com.instamojo:android-sdk:3.4.0] C:\Users\Rushabh.gradle\caches\transforms-2\files-2.1\811256b860a0ca6a3de017f237334983\jetified-android-sdk-3.4.0\AndroidManifest.xml as the library might be using APIs not available in 19 Suggestion: use a compatible library with a minSdk of at most 19, or increase this project's minSdk version to at least 21, or use tools:overrideLibrary="com.instamojo.android" to force usage (may lead to runtime failures)
Solution 1:[1]
as per the error the library is to minSDK 21 , so you have to use that as minSDK ,as for the particular librays docs please go through in detail , as per build file from github it can be seen minSDK is set as 21. see here in github of this build file from the library
Solution 2:[2]
This is confusing because there are 2 places where you can set the MinSDK. You can set it in the build.gradle file. (which is probably where you looking) and then also you forgot that it is set in "projects structure" screen. Go to the left in android studio and right click on your project and go down to "open module settings F4" in that screen under modules you can set the MinSDK. Make sure that and your build.gradle are the same.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | himel |
Solution 2 | 0ldMaid |