No resource found that matches the given name: attr 'colorPrimary'

后端 未结 1 549
天涯浪人
天涯浪人 2021-01-27 09:10

I am trying to change the color of my action bar in android studio. I have already changed the minSDKVersion to 21 so I know that is not the problem. Yet I keep getting the erro

1条回答
  •  北海茫月
    2021-01-27 09:49

    Use android:colorPrimary. colorPrimary on its own will only work if you are inheriting from Theme.AppCompat.

    So, for example, in this sample project, I have:

    
    
      
    
    

    0 讨论(0)
提交回复
热议问题