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. ...
随机推荐
- codeforces 814 C. An impassioned circulation of affection 【尺取法 or DP】
//yy:因为这题多组数据,DP预处理存储状态比每次尺取快多了,但是我更喜欢这个尺取的思想. 题目链接:codeforces 814 C. An impassioned circulation of ...
- oracle 10g将数据导入到指定表空间的步骤
--创建临时表空间 create temporary tablespace yhtemp tempfile 'D:/oracle/oradata/Oracle10g/yhtemp.dbf' size ...
- 有趣的IntegerCache
一个很有趣的现象,下面这两个结果输出的结果是false true,这是为什么? 翻看Integer的源码可以看到,当new Integer(12);时,没有什么特别的,就是通过构造方法创建了一个I ...
- Ajax三级联动操作的js代码
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...
- 4springboot:日志(上)
1.主流的日志框架 2.SLF4J使用 如何在系统中使用SLF4j https://www.slf4j.org 以后开发的时候,日志记录方法的调用,不应该来直接调用日志的实现类,而是调用日志抽象层里面 ...
- iPhone 耳机在PC电脑上使用方法
把主声道(Master)从正中间调整到最左或者最右就行了
- centos7 yum安装mysql后启动不起来问题
[root@localhost ~]# systemctl start mysqld 启动失败 Job for mysqld.service failed because the cont ...
- Java 线程池使用
在实现类中,运用线程池 serviceImpl.java //定义线程池 private static ThreadPoolExecutor executor1 = new ThreadPoolExe ...
- Extjs header column 自定义排序规则
Extjs 的表格自带排序功能,这个功能在大部分情况下能够满足我们的需求,但是在某种情况下,例如IP排序,默认情况下,按照字符串进行排序, 此时我们需要自定义排序规则,这个时候就需要我们重写方法了, ...
- SQLlearn