I don't understand this error message
C:\Program Files (x86)\Jenkins\workspace\__temp-mobile-prev\platforms\android\AndroidManifest.xml:67:5 Error:
uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library C:\Program Files (x86)\Jenkins\workspace\__temp-mobile-prev\platforms\android\build\intermediates\exploded-aar\com.paypal.sdk\paypal-android-sdk\2.14.2\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.paypal.android.sdk.payments" to force usage
Because line 67 of AndroidManifest.xml looks like:
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="22" />
Where does 15 come from?
I use ionic to build my app. But I don't think that this is the problem.
Increase the minSdkVersion as your requirement, hope it will be solved.
Try this instead. Change
minSdkVersion 15
tominSdkVersion 16
in build.gradle(module: app)Maybe I found the problem.
I don't want to overwride the build.gradle, because cordova create this file dynamically. But I searched why that
cdvMinSdkVersion
returns a wrong value. And the reason was this barcodescanner-plugin. The plugin gradle file has this linewhich overwrite my value from AndroidManifest.xml. After I have remove and add the plugin again it works. But I don't know why? Maybe someone could explain the order of the different gradle scripts.
Please Follow these three steps to solve this error in ionic 3
1)
projectfolder/platforms/android/CordovaLib/AndroidManifest.xml
<uses-sdk android:minSdkVersion="16" />
change this to<uses-sdk android:minSdkVersion="19" />
2)
projectfolder/platforms/android/gradle.properties
cdvMinSdkVersion=16 or X
change tocdvMinSdkVersion=19
3)
projectfolder/config.xml
<preference name="android-minSdkVersion" value="16" />
change to`
The problem started for me after I added "jitPak" library for viewing PDF, the root cause of the problem turn out to be line 13 in build.gradel (Module Level). Just change the version from 15 to 16, will resolve the issue.
Here are some context to understand the things:
By default, when importing a library with a minSdkVersion value that's higher than the main manifest file, an error occurs and the library cannot be imported. To make the merger tool ignore this conflict and import the library while keeping your app's lower minSdkVersion value, add the overrideLibrary attribute to the tag. The attribute value can be one or more library package names (comma-separated), indicating the libraries that can override the main manifest's minSdkVersion.
For example, if your app's main manifest applies overrideLibrary like this:
Then the following manifest can be merged without an error regarding the <uses-sdk> tag, and the merged manifest keeps minSdkVersion="2" from the app manifest.