The word @drawable is not correctly spelled
I have a styles.xml file with the following in it:
<style name="Theme.MyApp" parent="android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="android:style/Widget.Holo.ActionBar">
<item name="android:background">@drawable/actionbar_b</开发者_Python百科item>
</style>
I get the error The @drawable is not correctly spelled'.
actionbar_b' file is on its place.
in Eclipse go to Window/preferences/Editors/text editors/spelling and remove check from "Enable check spelling"
The style file "styles.xml" must be start with:
<?xml version="1.0" encoding="utf-8"?>
<resources>
and finish with:
</resources>
Example:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.MyApp" parent="android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="android:style/Widget.Holo.ActionBar">
<item name="android:background">@drawable/actionbar_b</item>
</style>
</resources>
I had this error when I forgot to write the .xml extension of the created file.
You can ignore the error. It will build anyway.
精彩评论