Strange error in colors.xml file in 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: Error: XML document structures must start and end
within the same entity."
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
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 ?
android xml gradle
|
show 9 more comments
I've been searching for a solution for this but nobody actually can confirm ... when creating new android studio project
"colors.xml:9:18: Error: XML document structures must start and end
within the same entity."
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
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 ?
android xml gradle
If that's in your resource folder, then just delete it. I could be wrong but it looks like a copy & paste mistake.
– Aaron
Nov 21 at 0:17
i said it's a new project , i didn't change anything ... @Aaron
– Ammar M Mashfj
Nov 21 at 0:21
The xml is malformed and incomplete, it's likely causing the issue
– Wayne Phipps
Nov 21 at 0:28
So? It certainly doesn't look right, the xml is incomplete and no colors defined in it. You could either try deleting it, or find the history and revert it.
– Aaron
Nov 21 at 0:31
I know , but it was created that way , and that is the question , why it was created that way ... @WaynePhipps
– Ammar M Mashfj
Nov 21 at 0:36
|
show 9 more comments
I've been searching for a solution for this but nobody actually can confirm ... when creating new android studio project
"colors.xml:9:18: Error: XML document structures must start and end
within the same entity."
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
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 ?
android xml gradle
I've been searching for a solution for this but nobody actually can confirm ... when creating new android studio project
"colors.xml:9:18: Error: XML document structures must start and end
within the same entity."
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
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 ?
android xml gradle
android xml gradle
edited Nov 21 at 5:08
Lekr0
18610
18610
asked Nov 21 at 0:10
Ammar M Mashfj
63
63
If that's in your resource folder, then just delete it. I could be wrong but it looks like a copy & paste mistake.
– Aaron
Nov 21 at 0:17
i said it's a new project , i didn't change anything ... @Aaron
– Ammar M Mashfj
Nov 21 at 0:21
The xml is malformed and incomplete, it's likely causing the issue
– Wayne Phipps
Nov 21 at 0:28
So? It certainly doesn't look right, the xml is incomplete and no colors defined in it. You could either try deleting it, or find the history and revert it.
– Aaron
Nov 21 at 0:31
I know , but it was created that way , and that is the question , why it was created that way ... @WaynePhipps
– Ammar M Mashfj
Nov 21 at 0:36
|
show 9 more comments
If that's in your resource folder, then just delete it. I could be wrong but it looks like a copy & paste mistake.
– Aaron
Nov 21 at 0:17
i said it's a new project , i didn't change anything ... @Aaron
– Ammar M Mashfj
Nov 21 at 0:21
The xml is malformed and incomplete, it's likely causing the issue
– Wayne Phipps
Nov 21 at 0:28
So? It certainly doesn't look right, the xml is incomplete and no colors defined in it. You could either try deleting it, or find the history and revert it.
– Aaron
Nov 21 at 0:31
I know , but it was created that way , and that is the question , why it was created that way ... @WaynePhipps
– Ammar M Mashfj
Nov 21 at 0:36
If that's in your resource folder, then just delete it. I could be wrong but it looks like a copy & paste mistake.
– Aaron
Nov 21 at 0:17
If that's in your resource folder, then just delete it. I could be wrong but it looks like a copy & paste mistake.
– Aaron
Nov 21 at 0:17
i said it's a new project , i didn't change anything ... @Aaron
– Ammar M Mashfj
Nov 21 at 0:21
i said it's a new project , i didn't change anything ... @Aaron
– Ammar M Mashfj
Nov 21 at 0:21
The xml is malformed and incomplete, it's likely causing the issue
– Wayne Phipps
Nov 21 at 0:28
The xml is malformed and incomplete, it's likely causing the issue
– Wayne Phipps
Nov 21 at 0:28
So? It certainly doesn't look right, the xml is incomplete and no colors defined in it. You could either try deleting it, or find the history and revert it.
– Aaron
Nov 21 at 0:31
So? It certainly doesn't look right, the xml is incomplete and no colors defined in it. You could either try deleting it, or find the history and revert it.
– Aaron
Nov 21 at 0:31
I know , but it was created that way , and that is the question , why it was created that way ... @WaynePhipps
– Ammar M Mashfj
Nov 21 at 0:36
I know , but it was created that way , and that is the question , why it was created that way ... @WaynePhipps
– Ammar M Mashfj
Nov 21 at 0:36
|
show 9 more comments
2 Answers
2
active
oldest
votes
I don't know how you got that color xml but that's definitely not a color xml file.
A color.xml file looks like below image
Copy below code to your color.xml file to solve your error.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="your_color">#FFFFFF</color>
</resources>
2
My question is about how the file got created that way ...not for how to fix this file in particular ... As i said it's not the only file ...
– Ammar M Mashfj
Nov 21 at 5:11
add a comment |
I'm literally facing the same issue, did you somehow managed to resolve it?
I though I've been getting this error after invalidating cache and restart Android Studio but it seems to be some kind of different bug from IDE itself.
nope , no Answer yet , anyhow I've submitted the bug to google issuetracker.google.com/issues/119838399
– Ammar M Mashfj
Dec 14 at 14:39
droid version 3.2 is too messed up to resolve unexpected bugs at uncertain times, upgraded to Studio version 3.4 Canary 6 till they make previous versions stable or might stick up to it.
– dvlpr
Dec 15 at 22:08
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53403502%2fstrange-error-in-colors-xml-file-in-android-studio%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I don't know how you got that color xml but that's definitely not a color xml file.
A color.xml file looks like below image
Copy below code to your color.xml file to solve your error.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="your_color">#FFFFFF</color>
</resources>
2
My question is about how the file got created that way ...not for how to fix this file in particular ... As i said it's not the only file ...
– Ammar M Mashfj
Nov 21 at 5:11
add a comment |
I don't know how you got that color xml but that's definitely not a color xml file.
A color.xml file looks like below image
Copy below code to your color.xml file to solve your error.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="your_color">#FFFFFF</color>
</resources>
2
My question is about how the file got created that way ...not for how to fix this file in particular ... As i said it's not the only file ...
– Ammar M Mashfj
Nov 21 at 5:11
add a comment |
I don't know how you got that color xml but that's definitely not a color xml file.
A color.xml file looks like below image
Copy below code to your color.xml file to solve your error.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="your_color">#FFFFFF</color>
</resources>
I don't know how you got that color xml but that's definitely not a color xml file.
A color.xml file looks like below image
Copy below code to your color.xml file to solve your error.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="your_color">#FFFFFF</color>
</resources>
answered Nov 21 at 4:17
Lekr0
18610
18610
2
My question is about how the file got created that way ...not for how to fix this file in particular ... As i said it's not the only file ...
– Ammar M Mashfj
Nov 21 at 5:11
add a comment |
2
My question is about how the file got created that way ...not for how to fix this file in particular ... As i said it's not the only file ...
– Ammar M Mashfj
Nov 21 at 5:11
2
2
My question is about how the file got created that way ...not for how to fix this file in particular ... As i said it's not the only file ...
– Ammar M Mashfj
Nov 21 at 5:11
My question is about how the file got created that way ...not for how to fix this file in particular ... As i said it's not the only file ...
– Ammar M Mashfj
Nov 21 at 5:11
add a comment |
I'm literally facing the same issue, did you somehow managed to resolve it?
I though I've been getting this error after invalidating cache and restart Android Studio but it seems to be some kind of different bug from IDE itself.
nope , no Answer yet , anyhow I've submitted the bug to google issuetracker.google.com/issues/119838399
– Ammar M Mashfj
Dec 14 at 14:39
droid version 3.2 is too messed up to resolve unexpected bugs at uncertain times, upgraded to Studio version 3.4 Canary 6 till they make previous versions stable or might stick up to it.
– dvlpr
Dec 15 at 22:08
add a comment |
I'm literally facing the same issue, did you somehow managed to resolve it?
I though I've been getting this error after invalidating cache and restart Android Studio but it seems to be some kind of different bug from IDE itself.
nope , no Answer yet , anyhow I've submitted the bug to google issuetracker.google.com/issues/119838399
– Ammar M Mashfj
Dec 14 at 14:39
droid version 3.2 is too messed up to resolve unexpected bugs at uncertain times, upgraded to Studio version 3.4 Canary 6 till they make previous versions stable or might stick up to it.
– dvlpr
Dec 15 at 22:08
add a comment |
I'm literally facing the same issue, did you somehow managed to resolve it?
I though I've been getting this error after invalidating cache and restart Android Studio but it seems to be some kind of different bug from IDE itself.
I'm literally facing the same issue, did you somehow managed to resolve it?
I though I've been getting this error after invalidating cache and restart Android Studio but it seems to be some kind of different bug from IDE itself.
answered Dec 10 at 22:29
dvlpr
1
1
nope , no Answer yet , anyhow I've submitted the bug to google issuetracker.google.com/issues/119838399
– Ammar M Mashfj
Dec 14 at 14:39
droid version 3.2 is too messed up to resolve unexpected bugs at uncertain times, upgraded to Studio version 3.4 Canary 6 till they make previous versions stable or might stick up to it.
– dvlpr
Dec 15 at 22:08
add a comment |
nope , no Answer yet , anyhow I've submitted the bug to google issuetracker.google.com/issues/119838399
– Ammar M Mashfj
Dec 14 at 14:39
droid version 3.2 is too messed up to resolve unexpected bugs at uncertain times, upgraded to Studio version 3.4 Canary 6 till they make previous versions stable or might stick up to it.
– dvlpr
Dec 15 at 22:08
nope , no Answer yet , anyhow I've submitted the bug to google issuetracker.google.com/issues/119838399
– Ammar M Mashfj
Dec 14 at 14:39
nope , no Answer yet , anyhow I've submitted the bug to google issuetracker.google.com/issues/119838399
– Ammar M Mashfj
Dec 14 at 14:39
droid version 3.2 is too messed up to resolve unexpected bugs at uncertain times, upgraded to Studio version 3.4 Canary 6 till they make previous versions stable or might stick up to it.
– dvlpr
Dec 15 at 22:08
droid version 3.2 is too messed up to resolve unexpected bugs at uncertain times, upgraded to Studio version 3.4 Canary 6 till they make previous versions stable or might stick up to it.
– dvlpr
Dec 15 at 22:08
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53403502%2fstrange-error-in-colors-xml-file-in-android-studio%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If that's in your resource folder, then just delete it. I could be wrong but it looks like a copy & paste mistake.
– Aaron
Nov 21 at 0:17
i said it's a new project , i didn't change anything ... @Aaron
– Ammar M Mashfj
Nov 21 at 0:21
The xml is malformed and incomplete, it's likely causing the issue
– Wayne Phipps
Nov 21 at 0:28
So? It certainly doesn't look right, the xml is incomplete and no colors defined in it. You could either try deleting it, or find the history and revert it.
– Aaron
Nov 21 at 0:31
I know , but it was created that way , and that is the question , why it was created that way ... @WaynePhipps
– Ammar M Mashfj
Nov 21 at 0:36