0

I am new to Android and trying to get material design to work but when I add the dependencies to do so I get the following error:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version L declared in library com.android.support:appcompat-v7:21.0.0-rc1

I am following instructions on this page: http://developer.android.com/training/material/compatibility.html

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
Nicola Sansom
  • 129
  • 1
  • 1
  • 12

4 Answers4

0

21.0.0-rc1 is a pretty old compatibility library version, which is likely the cause of the issue, use the following:

com.android.support:appcompat-v7:23.1.1
Egor
  • 39,695
  • 10
  • 113
  • 130
0

you cannot add rc1 at the end, because you don't have that library in you Android studio. You might be having different version. Rather than adding manually, follow the below instructions

RightClick your app -> open module setting (shortcut f4) ->app ->dependency tab -> click (+) Plus -> then add the design library from it. (if the problem is library version then it will be solved)

if still the problem exists trying changing minSDK to 16

kishorepatel
  • 139
  • 1
  • 6
0

Currently you are using 21.0.0-rc1 but you are trying to use a really old version.

You can use numerous SDK aswell:

<uses-sdk android:minSdkVersion="integer"
      android:targetSdkVersion="integer"
      android:maxSdkVersion="integer" />

This will be placed in the manifest.

This can be also done in android studio:

File -> Project Structure -> app -> build Tools version -> select the one you want to lower it too.

S A
  • 827
  • 10
  • 23
  • Where would this be placed on my gradle file it currently has this: defaultConfig { applicationId "com.sansom.nicola.fooddiary" minSdkVersion 15 targetSdkVersion 19 versionCode 1 versionName "1.0" } – Nicola Sansom Jan 19 '16 at 17:09
0

For some reasons you are using the library (check your build.gradle)

com.android.support:appcompat-v7:21.0.0-rc1.

This library was a preview of the final v21 and it has minSdk=L (=21).
In your case your are using minSdk=15 < 21.

It is the reason of your issue.

In general you can't use in your project a minSdk lower the minSdk of one of your dependencies

Also it is very important to highlight that you are using a preview (and deprecated) library and you shouldn't use it.

Use the latest version:

com.android.support:appcompat-v7:23.1.1
Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841