1
 <style name="ButtonText">
    <item name="android:layout_width">fill_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:textColor">#ffffff</item>
        <item name="android:gravity">center</item>
        <item name="android:layout_margin">3dp</item>
        <item name="android:textSize">30sp</item> 
        <item name="android:textStyle">bold</item>
        <item name="android:shadowColor">#000000</item>
        <item name="android:shadowDx">1</item>
        <item name="android:shadowDy">1</item>
        <item name="android:shadowRadius">2</item>
  </style>

I am getting this weird error saying 'Originally posted here' on line

<item name="android:textSize">30sp</item> in my xml file. I am using android 2.3.

I am also getting error in style.xml

 <style name="ButtonText" parent="BaseTopBar">
        <item name="android:textSize">14dp</item>
 </style>

The error is 'Resource entry ButtonText already has bag item android:textSize'

Can someone help please.

2
  • 3
    Please post text, not images, or at least provide a textual description as well as an image. Commented Jan 12, 2013 at 6:14
  • @user958263 Are you setting textsize property two time, may be this is the problem. Commented Jan 12, 2013 at 6:28

2 Answers 2

1

it seems like everything is right in your string.xml file You just need to clean and build your project.

if it doesn't work delete the bin/ and gen/ directory from your project than clean build your project.

and the error will not be shown anymore.hope it will help.

Sign up to request clarification or add additional context in comments.

4 Comments

make sure there is no file like filename.out.xml anywhere in your project.
there isnt. This is so annoying its not generating R.java file due to errors mentioned above.
please try restarting eclipse.i know that may not b the error but just try.
0

I had a similar issue but when using multiple array lists in my strings.xml.

enter image description here

It turned out that I had duplicate names for the arrays where I'd copied and pasted values.

Check that the style name ButtonText isn't duplicated somewhere else. You should have a corresponding error like the image below:

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.