2016-03-04 46 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

謝謝,它的工作原理 –

相關問題