Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ripple requires API level 21 (current min is 11), android?

I have the below drawable

<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight" >

<item>
    <shape android:shape="oval" >
        <solid android:color="?android:colorAccent" />
    </shape>
</item>

And I am getting this error

<ripple> requires API level 21 (current min is 11)

How do I solve it?

like image 971
WISHY Avatar asked Mar 21 '15 06:03

WISHY


1 Answers

You are using minsdk=11.

You can't use this drawable with api<21.

You have to use diffent versions of this drawable file.
Put this code in res/drawable-v21/myRipple.xml and create a different res/drawable/myRipple.xml

like image 77
Gabriele Mariotti Avatar answered Sep 22 '22 10:09

Gabriele Mariotti