No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Invers

1.错误log

E:\Learn\apidemo\ApiDemos\testsource\build\intermediates\res\merged\debug\values-v23\values-v23.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
E:\Learn\apidemo\ApiDemos\testsource\build\intermediates\res\merged\debug\values-v23\values-v23.xml:34: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
E:\Learn\apidemo\ApiDemos\testsource\build\intermediates\res\merged\debug\values-v24\values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
E:\Learn\apidemo\ApiDemos\testsource\build\intermediates\res\merged\debug\values-v24\values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

2.看看我的gradle文件



3.分析解决

可以看到compileSdkVersion 21而使用v7的版本25.2.0很显然使用高版本的v7到sdk21里面当然找不到相关资源
解决方法1:升高sdk版本如修改为 compileSdkVersion 25即可
解决方法2:降低v7版本可你使用的sdk版本保持一致
虽然两个方法都可以但是还是最好使用方法1,这样可以使用一些新的特性。而方法2却无法使用一些新的特性





评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值