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. ...
随机推荐
- MATLAB入门学习(五)
现在,我们来学画图吧.╭( ・ㅂ・)و ̑̑ 绘制函数图像最常用的命令是plot plot(x,y,s)x,y为同维向量,绘制分别以x为横坐标,y为纵坐标的曲线 如果x y 是矩阵的话则会绘制多条曲线 ...
- nrf52840蓝牙BLE5.0空中数据解析
一.基础知识: 我没找到蓝牙5.0的ATT数据格式图片,在蓝牙4.0的基础上做修改吧,如下图所示: 二.测试与分析: 参数设置: data length = 251字节,MTU = 247字节, ...
- 关于<meta>的各种用处以及移动端的常见问题
1.优先使用最新版本的IE和Chrome <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1& ...
- Vue.js-简单的增删查功能
1.Vue.js是什么? Vue (读音 /vjuː/,类似于 view) 是一套用于构建用户界面的渐进式框架.与其它大型框架不同的是,Vue 被设计为可以自底向上逐层应用.Vue 的核心库只关注视图 ...
- 二十二、详述 IntelliJ IDEA 中恢复代码的方法
在咱们正常开发项目的时候,难免遇到在开发过程中由于某种原因,想要将代码恢复到前一版本的情景.特别是在咱们删除了某些代码,想要恢复之前删除的代码的时候,了解这个在 IntelliJ IDEA 中恢复代码 ...
- stm32函数库分析
1.STM32F10x_StdPeriph_Lib_V3.5.0 是库函数的全称 2.libraries里面包含的是函数库.C和.H以及CMSIS部分 3.Project里面包含针对MCU各个模块的 ...
- 管理Django1.9静态文件static
管理Django1.9静态文件static 网站通常需要增加图片.JavaScript.或者CSS等文件提供服务.在Django中,我们把这些文件称为“静态文件”(static files).Djan ...
- js 获取任意一个元素的任意一个样式属性的值
//谷歌,火狐支持console.log(window.getComputedStyle(my$("dv"),null).left);//IE8支持console.log(my$( ...
- 微信小程序中的app文件介绍
[app] 一.app.json 1.对当前小程序的全局配置 2.页面路径.界面表现.网络超时时间.底部 tab 等 { "pages":[ "pages/index/i ...
- python初学者日记02(正则表达式)
写作时间:2018/12/17 作者:永远的码农(博客园) 一.正则表达式简介: 正则表达式,又称规则表达式.(英语:Regular Expression,在代码中常简写为regex.regexp或R ...