Android Studio create project generate colors.xml with junk characters

余生颓废 提交于 2020-01-03 02:47:06

问题


Suddenly my Android Studio always generates the colors.xml file with junk characters when creating a new project. I have scoured the internet and found no answer. Does anyone have any idea as to why this is happening?

I'm using Android Studio 3.2.1 which I just updated recently. But, the problem already occurred in the previous version. At first, I thought that this is an encoding problem, but my settings already specify UTF-8 for all files. Also, opening the same file in other text editors display the same result.

Of course, I can just edit and replace the colors.xml file with the correct content. But, I fear this problem will escalate in the future if I leave them.

Here is a screenshot of the file in question:

Here is the screenshot of my setting:


回答1:


Let me post an answer for future reference. The problem was solved by uninstalling Android Studio and clearing all settings. After I reinstall Android Studio the problem was corrected.

On Windows 10, I chose "clear user settings" while uninstalling. I also deleted the .AndroidStudio and .AndroidStudio3.2 folders in "C:\Users[user]\" after I backup those folders. After that, I reinstall Android Studio and redo all the settings. Now my Android Studio can create a new project without a problem.




回答2:


Android Studio 3.2.1
I found a solution! Just delete user settings folder ..\Users\%USERNAME%\ .AndroidStudio3.2



来源:https://stackoverflow.com/questions/52909918/android-studio-create-project-generate-colors-xml-with-junk-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!