How to solve an unknown internal error in possible gradle in android studio, that is producing bad new projects and infecting previous work?










0















For no discern-able reason, since today when I create a new project in Android Studio, every single time I get this



image showing how all new projects (basic Hello World) are being created by android studio. Please check this



enter image description here



Notable points are-
- colors.xml is always blank
- D:scodeappsMyApplication3appsrcmainresvalues*colors.xml:1:1: Error: Content is not allowed in prolog.*



googling for this last line, an SO post mentioned "delete gradle caches".



Not implementing that, on opening an existing projects, this happens



the styles.xml is half-deleted,



enter image description here



and I don't know how to describe what happens to colors.xml, do take a look



enter image description here



Tried clean build and rebuilding.
Tried invalidating cache and restart.
Tried reboot



Then as mentioned above, deleted contents form .gradle/caches/



Yet this issue is persistent.



Any suggestions are welcome



UPDATE 1



I uninstalled android studio, with settings. Then reinstalled.
This changed my SHA1 key,
but most importantly I'm not able to use views and their attributes properly



when I add and edittext, it happens like this



  1. (the element tag comes without the width and height attributes, like
    it normally does)

  2. and this image shows that even when I try to manually add
    attributes, they are SIMPLY NOT AVAILABLE









share|improve this question
























  • try to re-install android studio, looks like your android plugin has been removed.

    – Karan Mer
    Nov 16 '18 at 5:14











  • @KaranMer I just reinstalled it before posting this update. You suggesting I reinstall again?

    – C Forge
    Nov 16 '18 at 5:39











  • can you check for updates and update if there are any?

    – Karan Mer
    Nov 16 '18 at 5:51











  • @KaranMer I did that...there were for "Emulator, NDK, Google API System Image". Still I initiated the update. No changes

    – C Forge
    Nov 16 '18 at 5:58











  • are you sure you are using correct versions make sure your jdk, android studio and os are similar i.e 32 bit or 64 bit. all 3 must be same.

    – Karan Mer
    Nov 16 '18 at 6:01















0















For no discern-able reason, since today when I create a new project in Android Studio, every single time I get this



image showing how all new projects (basic Hello World) are being created by android studio. Please check this



enter image description here



Notable points are-
- colors.xml is always blank
- D:scodeappsMyApplication3appsrcmainresvalues*colors.xml:1:1: Error: Content is not allowed in prolog.*



googling for this last line, an SO post mentioned "delete gradle caches".



Not implementing that, on opening an existing projects, this happens



the styles.xml is half-deleted,



enter image description here



and I don't know how to describe what happens to colors.xml, do take a look



enter image description here



Tried clean build and rebuilding.
Tried invalidating cache and restart.
Tried reboot



Then as mentioned above, deleted contents form .gradle/caches/



Yet this issue is persistent.



Any suggestions are welcome



UPDATE 1



I uninstalled android studio, with settings. Then reinstalled.
This changed my SHA1 key,
but most importantly I'm not able to use views and their attributes properly



when I add and edittext, it happens like this



  1. (the element tag comes without the width and height attributes, like
    it normally does)

  2. and this image shows that even when I try to manually add
    attributes, they are SIMPLY NOT AVAILABLE









share|improve this question
























  • try to re-install android studio, looks like your android plugin has been removed.

    – Karan Mer
    Nov 16 '18 at 5:14











  • @KaranMer I just reinstalled it before posting this update. You suggesting I reinstall again?

    – C Forge
    Nov 16 '18 at 5:39











  • can you check for updates and update if there are any?

    – Karan Mer
    Nov 16 '18 at 5:51











  • @KaranMer I did that...there were for "Emulator, NDK, Google API System Image". Still I initiated the update. No changes

    – C Forge
    Nov 16 '18 at 5:58











  • are you sure you are using correct versions make sure your jdk, android studio and os are similar i.e 32 bit or 64 bit. all 3 must be same.

    – Karan Mer
    Nov 16 '18 at 6:01













0












0








0








For no discern-able reason, since today when I create a new project in Android Studio, every single time I get this



image showing how all new projects (basic Hello World) are being created by android studio. Please check this



enter image description here



Notable points are-
- colors.xml is always blank
- D:scodeappsMyApplication3appsrcmainresvalues*colors.xml:1:1: Error: Content is not allowed in prolog.*



googling for this last line, an SO post mentioned "delete gradle caches".



Not implementing that, on opening an existing projects, this happens



the styles.xml is half-deleted,



enter image description here



and I don't know how to describe what happens to colors.xml, do take a look



enter image description here



Tried clean build and rebuilding.
Tried invalidating cache and restart.
Tried reboot



Then as mentioned above, deleted contents form .gradle/caches/



Yet this issue is persistent.



Any suggestions are welcome



UPDATE 1



I uninstalled android studio, with settings. Then reinstalled.
This changed my SHA1 key,
but most importantly I'm not able to use views and their attributes properly



when I add and edittext, it happens like this



  1. (the element tag comes without the width and height attributes, like
    it normally does)

  2. and this image shows that even when I try to manually add
    attributes, they are SIMPLY NOT AVAILABLE









share|improve this question
















For no discern-able reason, since today when I create a new project in Android Studio, every single time I get this



image showing how all new projects (basic Hello World) are being created by android studio. Please check this



enter image description here



Notable points are-
- colors.xml is always blank
- D:scodeappsMyApplication3appsrcmainresvalues*colors.xml:1:1: Error: Content is not allowed in prolog.*



googling for this last line, an SO post mentioned "delete gradle caches".



Not implementing that, on opening an existing projects, this happens



the styles.xml is half-deleted,



enter image description here



and I don't know how to describe what happens to colors.xml, do take a look



enter image description here



Tried clean build and rebuilding.
Tried invalidating cache and restart.
Tried reboot



Then as mentioned above, deleted contents form .gradle/caches/



Yet this issue is persistent.



Any suggestions are welcome



UPDATE 1



I uninstalled android studio, with settings. Then reinstalled.
This changed my SHA1 key,
but most importantly I'm not able to use views and their attributes properly



when I add and edittext, it happens like this



  1. (the element tag comes without the width and height attributes, like
    it normally does)

  2. and this image shows that even when I try to manually add
    attributes, they are SIMPLY NOT AVAILABLE






android xml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 5:04







C Forge

















asked Nov 15 '18 at 19:29









C ForgeC Forge

1298




1298












  • try to re-install android studio, looks like your android plugin has been removed.

    – Karan Mer
    Nov 16 '18 at 5:14











  • @KaranMer I just reinstalled it before posting this update. You suggesting I reinstall again?

    – C Forge
    Nov 16 '18 at 5:39











  • can you check for updates and update if there are any?

    – Karan Mer
    Nov 16 '18 at 5:51











  • @KaranMer I did that...there were for "Emulator, NDK, Google API System Image". Still I initiated the update. No changes

    – C Forge
    Nov 16 '18 at 5:58











  • are you sure you are using correct versions make sure your jdk, android studio and os are similar i.e 32 bit or 64 bit. all 3 must be same.

    – Karan Mer
    Nov 16 '18 at 6:01

















  • try to re-install android studio, looks like your android plugin has been removed.

    – Karan Mer
    Nov 16 '18 at 5:14











  • @KaranMer I just reinstalled it before posting this update. You suggesting I reinstall again?

    – C Forge
    Nov 16 '18 at 5:39











  • can you check for updates and update if there are any?

    – Karan Mer
    Nov 16 '18 at 5:51











  • @KaranMer I did that...there were for "Emulator, NDK, Google API System Image". Still I initiated the update. No changes

    – C Forge
    Nov 16 '18 at 5:58











  • are you sure you are using correct versions make sure your jdk, android studio and os are similar i.e 32 bit or 64 bit. all 3 must be same.

    – Karan Mer
    Nov 16 '18 at 6:01
















try to re-install android studio, looks like your android plugin has been removed.

– Karan Mer
Nov 16 '18 at 5:14





try to re-install android studio, looks like your android plugin has been removed.

– Karan Mer
Nov 16 '18 at 5:14













@KaranMer I just reinstalled it before posting this update. You suggesting I reinstall again?

– C Forge
Nov 16 '18 at 5:39





@KaranMer I just reinstalled it before posting this update. You suggesting I reinstall again?

– C Forge
Nov 16 '18 at 5:39













can you check for updates and update if there are any?

– Karan Mer
Nov 16 '18 at 5:51





can you check for updates and update if there are any?

– Karan Mer
Nov 16 '18 at 5:51













@KaranMer I did that...there were for "Emulator, NDK, Google API System Image". Still I initiated the update. No changes

– C Forge
Nov 16 '18 at 5:58





@KaranMer I did that...there were for "Emulator, NDK, Google API System Image". Still I initiated the update. No changes

– C Forge
Nov 16 '18 at 5:58













are you sure you are using correct versions make sure your jdk, android studio and os are similar i.e 32 bit or 64 bit. all 3 must be same.

– Karan Mer
Nov 16 '18 at 6:01





are you sure you are using correct versions make sure your jdk, android studio and os are similar i.e 32 bit or 64 bit. all 3 must be same.

– Karan Mer
Nov 16 '18 at 6:01












1 Answer
1






active

oldest

votes


















0














Wrap content your xml files into <resources></resources> tag. For example colors.xml:



<resources>
<color name="red">#db001b</color>
....
</resources>


See this article.






share|improve this answer























  • I forgot to mention earlier, I tried manually adding normal colors in <resources> tags. Yet the effect is same. Further, did you see what is happening if I open old projects? That is more worrying

    – C Forge
    Nov 16 '18 at 1:52










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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53326689%2fhow-to-solve-an-unknown-internal-error-in-possible-gradle-in-android-studio-tha%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Wrap content your xml files into <resources></resources> tag. For example colors.xml:



<resources>
<color name="red">#db001b</color>
....
</resources>


See this article.






share|improve this answer























  • I forgot to mention earlier, I tried manually adding normal colors in <resources> tags. Yet the effect is same. Further, did you see what is happening if I open old projects? That is more worrying

    – C Forge
    Nov 16 '18 at 1:52















0














Wrap content your xml files into <resources></resources> tag. For example colors.xml:



<resources>
<color name="red">#db001b</color>
....
</resources>


See this article.






share|improve this answer























  • I forgot to mention earlier, I tried manually adding normal colors in <resources> tags. Yet the effect is same. Further, did you see what is happening if I open old projects? That is more worrying

    – C Forge
    Nov 16 '18 at 1:52













0












0








0







Wrap content your xml files into <resources></resources> tag. For example colors.xml:



<resources>
<color name="red">#db001b</color>
....
</resources>


See this article.






share|improve this answer













Wrap content your xml files into <resources></resources> tag. For example colors.xml:



<resources>
<color name="red">#db001b</color>
....
</resources>


See this article.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 15 '18 at 22:07









p.alexeyp.alexey

815614




815614












  • I forgot to mention earlier, I tried manually adding normal colors in <resources> tags. Yet the effect is same. Further, did you see what is happening if I open old projects? That is more worrying

    – C Forge
    Nov 16 '18 at 1:52

















  • I forgot to mention earlier, I tried manually adding normal colors in <resources> tags. Yet the effect is same. Further, did you see what is happening if I open old projects? That is more worrying

    – C Forge
    Nov 16 '18 at 1:52
















I forgot to mention earlier, I tried manually adding normal colors in <resources> tags. Yet the effect is same. Further, did you see what is happening if I open old projects? That is more worrying

– C Forge
Nov 16 '18 at 1:52





I forgot to mention earlier, I tried manually adding normal colors in <resources> tags. Yet the effect is same. Further, did you see what is happening if I open old projects? That is more worrying

– C Forge
Nov 16 '18 at 1:52



















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53326689%2fhow-to-solve-an-unknown-internal-error-in-possible-gradle-in-android-studio-tha%23new-answer', 'question_page');

);

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







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

政党