colors.xml:错误:类型'component'不支持(Android Studio) [英] colors.xml: Error: Unsupported type 'component' (Android studio)
问题描述
创建新项目后,我在colors.xml文件中遇到错误(此处有更多详细信息:
After the creation of a new project, I get an error with the colors.xml file (more details here: Error on first build after creating a project: XML document structures must start and end within the same entity) I "fixed" the colors.xml file and now I get this new error:
colors.xml: Error: Unsupported type 'component'
colors.xml文件如下所示:
The colors.xml file looks like this:
<application>
<component name="PropertiesComponent">
<property name="ATTACHED_TOOL_WINDOW.DEFAULT.NELE_EDITOR.COMPONENT_TREE.AUTO_HIDE" value="false" />
<property name="ATTACHED_TOOL_WINDOW.DEFAULT"/>
</component>
</application>
我在android项目中还没有做任何事情,我只是创建了它,而第一个构建不起作用.任何帮助将不胜感激.
I havent done anything in the android project, I just created it and the first build does not work. Any help is greatly appreciated.
推荐答案
颜色资源文件中没有Component
标记.
There is no Component
tag in a Color resource file.
这是colors.xml的示例
Here is an example of colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>
这篇关于colors.xml:错误:类型'component'不支持(Android Studio)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!