Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 479
mihirjoshi Avatar asked Jan 06 '23 20:01

mihirjoshi


1 Answers

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.

like image 149
Barmaley Avatar answered Jan 11 '23 01:01

Barmaley