[英]AAPT: error: '#ffffff' is incompatible with attribute drawable (attr) reference
I'm new to android programming so what I did was I created an application.我是 android 编程的新手,所以我所做的是创建了一个应用程序。
I made a backup of the whole application folder so I can repaste it again if ever I had troubles.我对整个应用程序文件夹进行了备份,以便在遇到问题时可以重新粘贴。
Now that I copy and pasted the backup files to the current project folder.现在我将备份文件复制并粘贴到当前项目文件夹中。 Everything went nuts.
一切都变得疯狂。
An error saying一个错误的说法
"AAPT: error: '#ffffff' is incompatible with attribute drawable (attr) reference."
“AAPT:错误:'#ffffff' 与属性可绘制 (attr) 引用不兼容。”
"AAPT: error: resource style/AppTheme.AppBarOverlay (aka com.example.reviewerapplication:style/AppTheme.AppBarOverlay) not found."
“AAPT:错误:找不到资源样式/AppTheme.AppBarOverlay(又名 com.example.reviewerapplication:style/AppTheme.AppBarOverlay)。”
"AAPT: error: attribute navGraph (aka com.example.reviewerapplication:navGraph) not found."
“AAPT:错误:找不到属性 navGraph(又名 com.example.reviewerapplication:navGraph)。”
That is just 3 samples of the 100+ errors with the same "AAPT" on it.这只是 100 多个错误中的 3 个样本,上面带有相同的“AAPT”。
Can anyone please help me...谁能帮帮我吗...
"AAPT: error: '#ffffff' is incompatible with attribute drawable (attr) reference."
You are using a color
in a drawable
attribute.您在
drawable
属性中使用color
。 You have to use a drawable
resources ( @drawable/...
)您必须使用
drawable
资源( @drawable/...
)
"AAPT: error: resource style/AppTheme.AppBarOverlay (aka com.example.reviewerapplication:style/AppTheme.AppBarOverlay) not found."
You are linking the @style/AppTheme.AppBarOverlay
but it doesn't exist in your res/values/styles.xml
file.您正在链接
@style/AppTheme.AppBarOverlay
但它在您的res/values/styles.xml
文件中不存在。
"AAPT: error: attribute navGraph (aka com.example.reviewerapplication:navGraph) not found."
It seems that you have to add in your build.gradle
some dependencies:看来您必须在
build.gradle
中添加一些依赖项:
dependencies {
def nav_version = "2.3.0-rc01"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.