现在的位置: 首页 > 综合 > 正文

升级android sdk到5.0,创建项目错误:No resource found that matches the given name ‘android:Widget…… ‘解决方法

2018年09月10日 ⁄ 综合 ⁄ 共 385字 ⁄ 字号 评论关闭

升级android sdk到5.0,创建项目错误:No resource found that matches the given name 'android:Widget.Material.A 解决方法

错误描述:
升级sdk 到5.0时,创建项目时会多创建一个库项目,叫appcompat_v7。
创建完成后,这个项目可能会报错,诸如出现:No resource found that matches the given name 'android:Widget.Material.ActionButton'等错误。
 

解决方案1:

使用sdk manager下载以下内容:
 
 
 
解决方案2:
如果你不想创建appcompat_v7,你可以在创建项目时将minimum Required SDK设置为4.1以上,这时就不再生成
appcompat_v7项目了,然后你再去清单文件中将minSdkVersion还原为8就行了.

抱歉!评论已关闭.