【问题标题】:Android Studio is not building complete filesAndroid Studio 没有构建完整的文件
【发布时间】:2019-03-18 10:10:48
【问题描述】:

每当我创建新项目时,android studio 都不会完全构建 colors.xml 文件。 colors.xml 文件是:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidLayouts">
    <shared>
        <config />
    </shared>
</component>
<component name="CMakeSettings">
    <configuratio

显然,android studio 给出的错误如下: 错误:XML 文档结构必须在同一个实体内开始和结束。

【问题讨论】:

  • 同样的问题?:stackoverflow.com/a/52782150/4409113 重新安装 android studio 可能有帮助吗?它使用UTF-8 格式,所以请在提供的链接中查看我的答案。
  • 项目编码已设置为系统默认值。重新安装android studio是唯一的解决方案吗?太费时间了。
  • 更新或重新安装。然后它会正常工作。请记住不要导入旧配置。不,我认为这不会花费太多时间。
  • 将全局编码更改为系统默认值,但得到相同的错误。
  • 我的网速太慢了..安装后下载sdks太费时间了:D

标签: android android-studio-3.2


【解决方案1】:

您的 XML 格式不正确。通常,此错误表明开始和结束标记的范围有问题。

         <?xml version="1.0" encoding="utf-8"?>
            <set xmlns:android="http://schemas.android.com/apk/res/android">

              <component android:name="AndroidLayouts">
                 <shared>
                   <config />
                 </shared>
             </component>

            </set> 

【讨论】:

  • android studio 没有完全构建 colors.xml 文件。 colors.xml 文件是: ...
  • 我知道这不是很好的格式。但我的问题是为什么 android studio 在制作新项目时没有自动完成文件?
猜你喜欢
  • 2016-09-25
  • 1970-01-01
  • 2022-08-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-10-12
  • 2020-11-11
  • 2020-04-09
相关资源
最近更新 更多