android - 尽管我拥有所有资源文件,但 Android 资源链接失败 | 科特林
问题描述
每当我在模拟器中运行应用程序时,它都会显示上述错误。但我有所有的资源文件。
屏幕截图中显示的依赖项。gradle 的其他部分是:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.modshabuisness"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
解决方案
你清理和重建项目了吗?您能否在您的 xml 文件中检查多个 xml 选择器<?xml version="1.0" encoding="utf-8"?>
,如果通过删除其他文件来保持它的单一性。
推荐阅读
- java - 如何从片段打开新布局并返回片段
- mysql - MySQL批量更新成功但未全部反映
- javascript - 使用 React 钩子时事件侦听器函数发生变化
- lua - Lua 字符串操作
- java - 为什么 Calendar.after 总是返回 true?
- c++ - 为什么 make_unique to vector::back() 创建另一个副本?
- java - 在 Chrome 和 Postman 中调试来自 Spring 的服务器发送事件流
- javascript - java backing bean加载图片后自动调用JS函数
- r - 如何在 ts 对象中插入 NA 值以填补另一个时间序列的空白?
- c++ - 在 C++ 中使用递归将表达式括起来以获得最小结果