gpt4 book ai didi

android - 解析 XML 时出错 : junk after document element;The markup in the document following the root element must be well- formed

转载 作者:数据小太阳 更新时间:2023-10-29 02:40:34 28 4
gpt4 key购买 nike

我收到这个错误:

在此行发现多个注释:- 文档中跟在根元素之后的标记必须格式正确。 - 错误:解析 XML 时出错:文档元素后出现垃圾

这出现在

的开头
<resources>
<!-- the theme applied to the application or activity -->
<style name="CustomActionBarTheme"
parent="@style/Theme.Holo">
<item name="android:actionBarStyle">@style/MyActionBar</item>
<item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
<item name="android:actionMenuTextColor">@color/actionbar_text</item>
</style>

<!-- ActionBar title text -->
<style name="MyActionBarTitleText"
parent="@style/TextAppearane.Holo.Widget.ActionBar.Title">
<item name="android:textColor">@color/actionbar_text</item>
</style>

<!-- ActionBar tabs text styles -->
<style name="MyActionBarTabText"
parent="@style/Widget.Holo.ActionBar.TabText">
<item name="android:textColor">@color/actionbar_text</item>
</style>

我接受任何帮助!!

最佳答案

尝试这种方式,希望这能帮助您解决问题。

问题是:您在样式的第一行忘记了 xmls 模式。

<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- the theme applied to the application or activity -->
<style name="CustomActionBarTheme"
parent="@style/Theme.Holo">
<item name="android:actionBarStyle">@style/MyActionBar</item>
<item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
<item name="android:actionMenuTextColor">@color/actionbar_text</item>
</style>

<!-- ActionBar title text -->
<style name="MyActionBarTitleText"
parent="@style/TextAppearane.Holo.Widget.ActionBar.Title">
<item name="android:textColor">@color/actionbar_text</item>
</style>

<!-- ActionBar tabs text styles -->
<style name="MyActionBarTabText"
parent="@style/Widget.Holo.ActionBar.TabText">
<item name="android:textColor">@color/actionbar_text</item>
</style>
</resources>

关于android - 解析 XML 时出错 : junk after document element;The markup in the document following the root element must be well- formed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25235033/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com