uses-sdk:minSdkVersion 15 cannot be smaller than v

2020-02-27 07:26发布

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.

15条回答
可以哭但决不认输i
2楼-- · 2020-02-27 08:18

As of release 2.14.0, the minSdkVersion has been increased to 16. If you prefer to have your app on a lower minSdkVersion and want to leverage the latest SDK, please disable PayPal for versions below API 16, add xmlns:tools="http://schemas.android.com/tools inside the manifest's xml declaration, and add the following snippet to your AndroidManifest.xml:

<uses-sdk android:minSdkVersion="INSERT_YOUR_DESIRED_minSdkVersion_HERE" tools:overrideLibrary="com.paypal.android.sdk.payments"/>
查看更多
3楼-- · 2020-02-27 08:19

I use @Naga suggestion, and it's work.
config.xml that I change is not in the root of project, but in platforms/android/app/src/main/res/xml/config.xml

and minSdkVersion in AndroidManifests.xml are not overwritten again

查看更多
神经病院院长
4楼-- · 2020-02-27 08:21

The problem for me was in cordova-plugin-browsertab.

You need to change line 1 of my_project/plugins/cordova-plugin-browsertab/src/android/BrowserTab.gradle to

def minSdkVersion = 19

Make sure you have the minimum SDK added to your config.xml

<preference name="android-minSdkVersion" value="19" />

Then remove and add cordova-android by:

cordova platform remove android
cordova platform add android
查看更多
登录 后发表回答