Android Studio中colors.xml文件中的奇怪错误 [英] Strange error in colors.xml file in Android Studio
问题描述
我一直在寻找解决方案,但是在创建新的android studio项目时,实际上没有人可以确认...
I've been searching for a solution for this but nobody actually can confirm ... when creating new android studio project
"colors.xml:9:18:错误:XML文档结构必须开始和结束 在同一实体中."
"colors.xml:9:18: Error: XML document structures must start and end within the same entity."
我打开colors.xml,其中包含一些奇怪的东西:
I open that colors.xml it contains some wierd stuff :
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidLayouts">
<shared>
<config />
</shared>
</component>
<component name="AndroidLogFilters">
<option n
是的,这是完整文件……这不是我的第一个项目,我知道那不是文件的外观,即使我用正确的语法替换了内容,其他文件中也有相同类型的错误出色地 , 所以我的问题是,为什么会这样? 我尝试清除android的缓存并完全删除了gradle的缓存...似乎没有任何作用,可能是什么问题?最初如何创建此文件?这是gradle的问题吗?
and YES that is the full file ... it's not my first project and i know that's not how the file should look , even if I replaced the content with the correct syntax , many error of the same type in other files as well , so my question is , why is this happening ? I tried clearing caches of android and deleted the cache of gradle entirely ...nothing seems to work , what could be the problem ? how this file even gets created in the first place ? is it a gradle problem ?
推荐答案
按照以下步骤操作,您的问题将得到解决:-
Follow these steps your problem will be solved:-
-
关闭Android Studio.
Close the Android Studio.
转到: C:\ users \您的用户名\ .AndroidStudio3.4 \ system \ caches
Go to: C:\users\your_user_name\.AndroidStudio3.4\system\caches
删除缓存文件夹.
转到: C:\ Users \您的用户名\ .gradle \ caches
Go to: C:\Users\your_user_name\.gradle\caches
也删除此缓存文件夹.
现在您可以启动Android Studio并开始工作.
Now you can start your Android Studio and start working.
您的问题将得到解决.
这篇关于Android Studio中colors.xml文件中的奇怪错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!