错误:(9, 5) 错误:资源 android:attr/dialogCornerRadius 未找到 [英] Error:(9, 5) error: resource android:attr/dialogCornerRadius not found

查看:42
本文介绍了错误:(9, 5) 错误:资源 android:attr/dialogCornerRadius 未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我安装了 android studio 3.0.1,一旦它打开构建的 gradle 并显示以下错误.我尝试添加设计和支持等依赖项,但徒劳无功.有人可以帮助我吗?先感谢您.

So I installed android studio 3.0.1 and as soon as it opened the gradle built and showed the following errors. I tried adding dependencies such as design and support but in vain. Could someone help me? Thank you in advance.

显示没有找到dialogCornerRadius、fontVariation Settings等一些属性.

It shows that some attributes such as dialogCornerRadius and fontVariation Settings not found.

推荐答案

出现这个错误是因为 compileSdkVersion 和库版本.

This error occurs because of mismatched compileSdkVersion and library version.

例如:

compileSdkVersion 27
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'

并避免在库中使用 + 符号,如下所示:

and also avoid to use + sign with library as in the following:

implementation 'com.android.support:appcompat-v7:26.+'

像这样使用确切的库版本

use exact library version like this

implementation 'com.android.support:appcompat-v7:26.1.0'

在库中使用 + 符号会使构建过程难以收集所需的确切版本,从而使系统不稳定,因此应避免使用.

Using + sign with the library makes it difficult for the building process to gather the exact version that is required, making system unstable, hence should be discouraged.

这篇关于错误:(9, 5) 错误:资源 android:attr/dialogCornerRadius 未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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