mihirjoshi
mihirjoshi

Reputation: 12201

Use library that require higher minSdkVersion than the current minSdkVersion

I am using Uber SDK which is designed to work with Android SDK 16. My current minSdkVersion is 14. I can use it like -

if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
  //Call specific function
}

and put xml in folder layout-v16. But manifest merger failed

uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library

How can I solve this ?

Upvotes: 4

Views: 1627

Answers (1)

Barmaley
Barmaley

Reputation: 16363

You have to declare in your manifest:

<uses-sdk tools:overrideLibrary="com.uber.sdk.android.rides" />

In this case you can ignore minSdk issue.

Use xmlns:tools="http://schemas.android.com/tools" in manfiest tag.

Upvotes: 10

Related Questions