Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

app:popupTheme= "@style/AppTheme.PopupOverlay"- Cannot be resolved to a variable

Tags:

android

I am having a minor problem with a field with my XML file when developing my interface for Android Studio. When hovering over my app:popupTheme= "@style/AppTheme.PopupOverlay", I am receiving an error message that signifies the field 'Cannot be resolved to a variable.

like image 468
sukh_johal95 Avatar asked Apr 06 '16 20:04

sukh_johal95


1 Answers

Sorry for late reply still it can help others who will be looking for solution.

It is because you are refering to your style.xml and there must not be any tag named as ... so you need to add these lines in your style.xml and it will resolve

 <style name="AppTheme.PopupOverlay" parent="AppTheme.PopupOverlay">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
like image 160
Abhinav Aggarwal Avatar answered Nov 08 '22 18:11

Abhinav Aggarwal