【React Native】app\build\intermediates\res\merged\debug\values-v24\values-v24.xml中错误
来源:互联网 发布:淘宝店铺logo设计 编辑:程序博客网 时间:2024/05/01 18:25
昨天在项目中使用了 react-native-svg 库,配置完成正在正常启动的时候,却出现四个错误,全部来源于app\build\intermediates\res\merged\debug\values-v24\values-v24.xml 文件。该文件的第三行和第四行的style项,试图删掉这两个文件,但删掉之后同步项目或直接运行的时候又自动加上了这两行,然后依然报错。
错误如下:
No resource found that matches the given name android:TextAppearance.Material.Widget.Button.Borderless.Colored;No resource found that matches the given name android:TextAppearance.Material.Widget.Button.Colored;No resource found that matches the given name android:TextAppearance.Material.Widget.Button.Borderless.Colored;No resource found that matches the given name android:TextAppearance.Material.Widget.Button.Colored;
然后开始各种google,在stackoverflow上找到了答案: 此问题stackoverflow上的答案
截图如下:
上面的解决方案是将自己新加模块的SDK版本调整至和原有项目的SDK版本一致,是可行的方案。
所以主要原因是因为添加的模块的SDK版本和原有项目的SDK版本的不匹配,需要将原有项目的 compileSdkVersion,buildToolsVersion,以及dependencies中的appcompat-v7 版本与新加模块的这三个版本改成相同即可。
可以改新加模块的版本,也可以可以改原有项目的版本(但是项目版本一般不推荐改动)。
修改步骤:
1-查看react-native-svg的android/build.gradle:
android{…}部分:
dependencies部分:
2-打开自己的项目的 build.gradle:
将compileSdkVersion,buildToolsVersion,以及dependencies中的appcompat-v7 版本与上面的react-native-svg的这三个版本改为一样,(也就是25,25.0.3,25.3.1)。重新同步项目就行了。
阅读全文
1 0
- 【React Native】app\build\intermediates\res\merged\debug\values-v24\values-v24.xml中错误
- 解决问题:app\build\intermediates\res\merged\debug\values-v24\values-v24.xml
- app\build\intermediates\res\merged\debug\values-v24\values-v24.xml
- 解决问题:app\build\intermediates\res\merged\debug\values-v24\values-v24.xml
- app\build\intermediates\res\merged\debug\values-v23\values-v23.xml 编译出错的问题
- app\build\intermediates\res\merged\debug\values-v23\values-v23.xml 编译出错的问题
- app\build\intermediates\res\merged\debug\values-v23\values-v23.xml 编译出错的问题
- Android app\build\intermediates\res\merged\debug\values-v23\values-v23.xml 编译出错的问题
- 问题build\intermediates\res\merged\debug\drawable-ldrtl-hdpi\
- values-v24 Error for android studio
- 项目引入bottom-navigation-bar values-v24 找不到资源问题
- Andriod res\values\strings.xml
- res中values下定义styles
- AS开发中出现Error(九)——app\build\intermediates\res\resources-xxx-stripped.ap_' specified for property 'res
- res/values目录常用xml文件
- 在res/values下创建attrs.xml
- android appcompat_v7\res\values-v23错误解决
- Hello World Android App, Error: workspace\appcompat_v7\res\values-v21\styles_base.xml No resource fo
- Codeforces 859 E Desk Disorder(并查集判环)
- LeetCode.50(69\367\633) Pow(x,n)&&Sqrt(x)&&Valid Perfect Square&&Sum of Square Numbers
- GitHub 更新:更新 timeline & 相似项目推荐
- 远程登录阿里云ECS
- 349. Intersection of Two Arrays 需要的python基础
- 【React Native】app\build\intermediates\res\merged\debug\values-v24\values-v24.xml中错误
- 《Spring技术内幕》学习笔记9——AOP通知以及编程式AOP
- 详述 MySQL 数据库的安装及配置
- MySQL Explain详解
- ligerDialog 弹窗关闭无法获取焦点
- POJ-2886-Who Gets the MostCandies?-(线段树)
- Android 异步消息机制 Handler Message Looper机制详解
- 最新!Win10+Tensorflow-gpu+Anaconda+Pycharm
- springmvc时间转化器