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
There is no Component
tag in a Color resource file.
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>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#79302a</color>
<color name="colorPrimaryDark">#561e1c</color>
<color name="colorAccent">#345f41</color>
</resources>
This is what a colors.xml looks like. See if it works for you
I had the same error, but also something similar in several files of the project every time i open a new project. I followed something that someone (can't remember the name) answer in another question:
1.- go to your user folder -->androidStudio folder --> System folder 2.- delete the caches folder
After that the error haven't came back. Hope this help someone else.
Ohh I too faced similar problems after upgrading studio to 3.2.1
many issues from different files while creating new project:
colors.xml
ic_launcher_round.xml - mipmap
I tried to change these but nothing worked, changing one is causing other issue.
Finally i have uninstalled 3.2.1 studio version and downloaded 3.1.4(android-studio-ide-173.4907809-windows.exe (828632688 bytes)) from here https://developer.android.com/studio/archive
and finally everything worked fine. Still i don't know is this an issue from 3.2.1 studio version.
Note: It's basically downgrading studio version :) worked for me.
It may be which browser you got the install file from.
I just had a student with the same problem (version 3.3 now), and it appears to have been fixed by having him install from a file downloaded with Chrome rather than with Edge. Did you originally install with an install file obtained using Edge?