Android:Gradle报错——No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius')
今天在使用科大讯飞语音识别SDK进行语音识别功能实现时,莫名的引入了这个错误。不得不吐槽Android Studio再引入别的包时太容易出现冲突,然后导致无法找到R文件,项目无法执行。
1. 具体报错
app/build/intermediates/res/merged/debug/values-v28/values-v28.xml Error:(, ) No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius').
...
Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt
2. 报错原因
在build项目时默认使用了values-v28下的style.xml,但无法找到与该style.xml相匹配的资源
3. 解决办法
修改build.gradle文件,取消动态依赖,指定特定版本的依赖
PS:最好将所有引用的包都改成同一版本的依赖
修改前:
compileSdkVersion
buildToolsVersion '26.0.2'
targetSdkVersion
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:appcompat-v7:+'
修改后:
compileSdkVersion
buildToolsVersion '26.0.2'
targetSdkVersion
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.2'
使用“+”时,会自动使用最新版本的values进行build,所以最好指定SDK的版本,避免不必要的错误
Android:Gradle报错——No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius')的更多相关文章
- 解决Android报错No resource found that matches the given name (at 'text' with value '@string/hello').
解决Android项目No resource found that matches the given name (at 'text' with value '@string/hello'). 如图, ...
- Android Gradle报错 (Error:No such property: GradleVersion for class: JetGradlePlugin) 的原因与解决
Error:No such property: GradleVersion for class: JetGradlePlugin 错误原因:IDE 版本(GradlePlugin)和 Gradle 版 ...
- 【gradle报错】error: package org.apache.http does not exist
导入项目的时候gradle报错 error: package org.apache.http does not exist 解决方法: 在build.gradle中加入 android { use ...
- Eclipse开发Android项目报错解决方案详细教程,最新版一篇就够了!
本文记录刚接触Android开发搭建环境后新建工程各种可能的报错,并亲身经历漫长的解决过程(╥╯^╰╥),寻找各种偏方,避免大家采坑,希望能帮助到大家. 报错信息 出错一:The import and ...
- tensorflow报错 tensorflow Resource exhausted: OOM when allocating tensor with shape
在使用tensorflow的object detection时,出现以下报错 tensorflow Resource exhausted: OOM when allocating tensor wit ...
- Android Studio报错Error:Failed to open zip file. Gradle's dependency cache may be corrupt
Android Studio导入项目后,Gradle编译失败,报错如下. Error:Failed to open zip file. Gradle's dependency cache may be ...
- 从Github上下载了项目,导入Android Studio,gradle 报错,应该怎么修改
一.从Github上获取源代码 我这里是直接下载ZIP文件 二.在本机的Android Studio上新建一个空白项目,目的主要是与刚从Github上下载的项目文件结构做对比 三.替换gradle文件 ...
- 安卓 android studio 报错 The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle
今天将项目迁移到另一台笔记本,进行build出现以下问题,导致build失败 报错截图: 大致意思,目前使用的build工具版本27.0.3不合适.因为当前使用Gradle插件版本是3.2.1,这个版 ...
- 安卓 android studio 报错 Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle.
报错截图: 问题原因:因为build.gradle中jcenter()或者maven()被墙了,所以会出现这种情况. 解决方案:(我的gradle版本是:classpath 'com.android. ...
随机推荐
- su
参数选项:-,-l,--login 切换用户的同时,将用户的家目录.系统环境变量等重新按切换后的用户初始化.-c 向shell传递单个命令,仅希望在某个用户下执行命令,而不用直接切换到该用户下来操作. ...
- C#使用DotNetZip对zip压缩包进行添加删除操作
参考:http://stackoverflow.com/questions/9855155/how-can-i-delete-a-directory-in-a-zip-file-using-net D ...
- Codeforces Round #527 (Div. 3) D2. Great Vova Wall (Version 2) 【思维】
传送门:http://codeforces.com/contest/1092/problem/D2 D2. Great Vova Wall (Version 2) time limit per tes ...
- 批量压缩文件夹到Zip文件
实现效果: 实现代码:
- 【转】spring boot web相关配置
spring boot集成了servlet容器,当我们在pom文件中增加spring-boot-starter-web的maven依赖时,不做任何web相关的配置便能提供web服务,这还得归于spri ...
- layUI不同页面传参数
//页面一的方法 function modifyHotSearch(id){ layer.open({ type:2, title:"修改热门搜索", area: ['600px' ...
- OC中对象的description方法
周所周知,我们在做项目时, 可以在类的.m文件中重写该类的对象的描述description方法: 示例: -(NSString *)description{ NSString *str = [N ...
- Oracle子查询之简单子查询
Oracle 简单子查询 顾名思义,简单子查询是嵌套在 SQL 语句中的另一个SELECT 语句,并且子查询只返回一列数据 1,单行子查询: 子查询 (内查询) 在主查询之前一次执行完成.子查询的结果 ...
- ARC下IBOutlet用weak还是strong
原文来自这里. 今天用Xcode5的时候,发现默认的IBoutlet的属性设置为weak——因为Xcode5建立的工程都是ARC的了.但是当时还有点不明白,因为项目的原因,一直没有正式使用过ARC.于 ...
- es6 Set 和Map 数据结构
ES6提供了新的数据结构Set,它类似于数组,但是成员的值都是唯一的,没有重复的值. Set 本身是一个数据结构,用来生成Set 数据结构. const s = new Set(); [2,3,5,4 ...