Style attribute attr/colorSecondary not found

前端 未结 3 1773
走了就别回头了
走了就别回头了 2020-12-18 21:15

I can\'t build my project. It shows me attr/colorSecondary not found error.

These are my styles and manifest files:

Android studi

3条回答
  •  暖寄归人
    2020-12-18 21:21

    You need to explicitly define the 'attr' type in the item in AS 3.0

    eg.

    @color/primaryColor
    

    Docs: https://web.archive.org/web/20180518223123/https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration

    Also, don't forget to define the attribute in your attrs.xml. eg.

    
        
    
    

提交回复
热议问题