Ripple需要API级别21(当前最小值为11),Android? [英] Ripple requires API level 21 (current min is 11), android?

查看:240
本文介绍了Ripple需要API级别21(当前最小值为11),Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下可绘制对象

<?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>

我收到此错误

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

我该如何解决?

推荐答案

您正在使用minsdk = 11.

You are using minsdk=11.

您不能在api< 21上使用此可绘制对象.

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

您必须使用此可绘制文件的不同版本.
将此代码放在res/drawable-v21/myRipple.xml中,并创建一个不同的res/drawable/myRipple.xml

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

这篇关于Ripple需要API级别21(当前最小值为11),Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆