【Bug】Android resource linking failed和error: failed linking references.

简介: 【Bug】Android resource linking failed和error: failed linking references.

Android resource linking failed

com.example.test3.app-mergeDebugResources-17:/values/values.xml:1213: error: resource color/colorPrimary (aka com.example.test3:color/colorPrimary) not found.

com.example.test3.app-mergeDebugResources-17:/values/values.xml:1214: error: resource color/colorPrimaryDark (aka com.example.test3:color/colorPrimaryDark) not found.

com.example.test3.app-mergeDebugResources-17:/values/values.xml:1215: error: resource color/colorAccent (aka com.example.test3:color/colorAccent) not found.

com.example.test3.app-mergeDebugResources-17:/values/values.xml:1213: error: resource color/colorPrimary (aka com.example.test3:color/colorPrimary) not found.

com.example.test3.app-mergeDebugResources-17:/values/values.xml:1214: error: resource color/colorPrimaryDark (aka com.example.test3:color/colorPrimaryDark) not found.

com.example.test3.app-mergeDebugResources-17:/values/values.xml:1215: error: resource color/colorAccent (aka com.example.test3:color/colorAccent) not found.

error: failed linking references.

我想说,如果在网上其他地方找了很长时间找到的方法都没有解决你的问题,那就去检查一下你的代码,代码写的有问题也可能会出现这样的bug

例如像这种:

这里的错误并不会有红色下划曲线的那种错误提示,但是飘红可能就代表有问题

相关文章
|
29天前
|
Android开发 开发者
Error:Could not find com.android.support:appcompat-v7:27.0.2.
Error:Could not find com.android.support:appcompat-v7:27.0.2.
16 0
|
18天前
|
Android开发 开发者
安卓投屏神器 Scrcpy安 报错ERROR: Could not find any ADB device
使用Scrcpy安卓投屏工具时遇到报错,问题根源是未开启开发者模式。解决步骤:进入设置,点击【关于手机】→连续点击版本号激活开发者模式,然后在【系统设置】→【开发者选项】中开启USB调试。参照此方法后可正常执行。Scrcpy软件下载链接和GitHub页面也已提供。
26 1
|
29天前
解决Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com
解决Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com
22 5
|
6月前
|
开发工具 Android开发 iOS开发
使用xamarin开发Android、iOS报错failed to open directory: 系统找不到指定的文件
使用vs2019学习xamarin时,创建新程序。使用模拟器真机等测试都报错如下图错误: ![请在此添加图片描述](https://developer-private-1258344699.cos.ap-guangzhou.myqcloud.com/column/article/5877188/20231030-de8ce5fd.png?x-cos-security-token=r4KyZDEowPT0kGTL0LqE8EnwfN1Nzexadb05dcffed3939ff8d7591c528c01706nvpGSE93QwHpZM8NwhJNTZctNRQa0l3KDhEnqj8P7d8t
65 0
使用xamarin开发Android、iOS报错failed to open directory: 系统找不到指定的文件
|
8月前
|
XML Android开发 数据格式
Android Binary XML file line #50: Error inflating class androidx.cardview.widget.CardView 错误
Android Binary XML file line #50: Error inflating class androidx.cardview.widget.CardView 错误
52 0
|
11月前
|
数据可视化 开发工具 Android开发
Android Git 拉取代码报错:error: cannot pull with rebase: Your index contains uncommitted changes.
造成原因:在使用Android Studio中Git的Commit Directory 将本地更改的代码保存到本地后,点击commit,发现提交不上去,发现本地有代码,这时候拉取代码,报错:cannot pull with rebase: Your index contains uncommitted changes.表示我的索引有未提交的改变
|
11月前
|
Android开发
Bug日志(四)——Android 防止多次点击(另解决多个列表子项点击)
在用户使用 应用的时候,经常会出现点击过快且多次点击同一控件的情况, 一方面这是因为应用或手机当前有些卡顿,网络卡啥的 另一方面也可能是由于很多应用并没有设置按钮点击时的 selector 或者其它按钮响应方式(例如点击按钮时按钮放大,常见于游戏),导致用户误认为没有点击到当前按钮。(比如使用selector再点击后更换背景颜色,图片等等)
|
11月前
|
XML Android开发 数据格式
Bug日志(二)-Android网路请求图片地址图片不显示
Bug日志(二)-Android网路请求图片地址图片不显示
|
算法 Java Android开发
Android 以太网子网掩码长度 bug 修复
Android 以太网子网掩码长度 bug 修复
127 0
|
Android开发
AAPT: error: resource android:attr/dialogCornerRadius not found.
AAPT: error: resource android:attr/dialogCornerRadius not found.
161 0