无法解析符号'AppTheme.AppCompat.Light.NoActionBar'

时间:2018-03-23 18:20:39

标签: android android-layout styles

I can't understand what is the problem

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="AppTheme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
</resources>

1 个答案:

答案 0 :(得分:1)

试试这个:

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
</resources>

同时检查您的com.android.support:appcompat-v7依赖关系