创建新项目后,colors.xml 文件出现错误(更多详细信息:Error on first build after creating a project: XML document structures must start and end within the same entity)我“修复”了 colors.xml 文件,现在出现了这个新错误:
colors.xml: Error: Unsupported type 'component'
colors.xml 文件如下所示:
<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 项目中做任何事情,我只是创建了它,但第一个构建不起作用。非常感谢任何帮助。
最佳答案
颜色资源文件中没有Component
标签。
这里是一个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>
关于android - 颜色.xml : Error: Unsupported type 'component' (Android studio),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52892088/