2016-03-04 94 views
0

当我编辑style.xml“的内容是不是在序言不允许”编辑style.xml

当我救了它,这个错误出现了:

内容不会在序言

允许

我知道这个问题已经被问到。 但那里的解决方案没有工作。

这是我style.xml文件:

?xml version="1.0" encoding="utf-8"?> <The error occur here> 
<resources> 
<style name="apptheme" parent="@android:Theme.DeviceDefault.Light"> 
    <item name="android:layout_width">fill_parent</item> 
    <item name="android:layout_height">wrap_content</item> 
    <item name="android:textColor">#00FF00</item> 
    <item name="android:typeface">monospace</item> 
</style> 
</resources> 

回答

4

你缺少一个左 “<”

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
    <style name="apptheme" parent="@android:Theme.DeviceDefault.Light"> 
     <item name="android:layout_width">fill_parent</item> 
     <item name="android:layout_height">wrap_content</item> 
     <item name="android:textColor">#00FF00</item> 
     <item name="android:typeface">monospace</item> 
    </style> 
</resources> 

您需要在启动 “?” 之前加上 “<” 权的文件。

+1

谢谢,它的工作原理 –

相关问题