0

i want to resolve my mistake pls help me

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@Color/ColorPrimary</item>

        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@Color/ColorAccent</item>

    </style>         

android say: Error:(9, 34) No resource found that matches the given name (at 'colorAccent' with value '@Color/ColorAccent').

3 Answers3

1

Check where the name id present in colors.xml and with the proper case sensitivity and spelling as the one which you mentioned in the style file.

Soumya
  • 1,350
  • 3
  • 19
  • 34
0

Xml cannot allow capitalization. So the file name should be color and not Color Be careful with cases. Attributes are like variables, start with small letters.

Show us your colors.xml

Francis Nduba Numbi
  • 2,499
  • 1
  • 11
  • 22
0
<resources>

    <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/ColorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/ColorAccent</item>
    </style>
<style name="Button_style" parent="@android:style/Widget.Button">
    <item name="android:textSize">25sp</item>
        <item name="android:background">#ffffad2f</item>
        <item name="android:textColor">#fff</item>
        <item name="android:textStyle">bold</item>
    </style>
</resources>

ok,i did so what is the problem again ?