The following code has 2 problems and also resulted in a missing file

66 views Asked by At
<!-- Base application theme. -->
<style name="Theme.AppCompat.Light.NoActionBar" parent="@style/Theme.AppCompat.Light">
    <!--  Customize your theme here. -->
    <item name="android:windowNoTitle">true</item>
    <item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="android:colorPrimary">@color/colorPrimary</item>
    <item name="android:colorAccent">@color/colorAccent</item>
    <item name="android:textColorPrimary">@color/colorTextPrimary</item>
    <item name="android:textColorSecondary">@color/colorTextSecondary</item>
</style>

This file is the styles.xml in one of my projects and there are 2 errors in the console:

error: Error: No resource found that matches the given name (at 'android:colorAccent' with value '@color/colorAccent').

error: Error: No resource found that matches the given name (at 'android:textColorPrimary' with value '@color/colorTextPrimary').

The R.java file is also missing.

I have been dealing with this problem since 2 days and I have searched a lot with many tabs open and tried many things. I still haven't found a solution that can remove the errors and get back the R.java file. Please help me to solve the problem. Thank you very much.

Here is the color.xml

<resources>
    <color name="list_item_title">#fff</color>
    <color name="list_background">#303030</color>
    <color name="list_background_pressed">#992416</color>
    <color name="list_divider">#303030</color>
    <!--  <color name="list_divider">#272727</color>-->
    <color name="counter_text_bg">#626262</color>
    <color name="counter_text_color">#c5c4c4</color>
    
    <!-- The main color of all layouts(Green) -->
    <color name="content_green">#00998A</color>
    <color name="content_green2">#00BB00</color>
    <color name="content_text">#FFFFFF</color>
   
    <!-- Colors in flashcard -->
    <color name="multiple_red">#DF4356</color>
    <color name="multiple_green">#00998A</color>
    <color name="multiple_grey">#9C9EA1</color>
    
</resources>
0

There are 0 answers