代码之家  ›  专栏  ›  技术社区  ›  Pouria Hemi

在android studio 3.1.4中不能使用“?attr/actionBarSize”[重复]

  •  0
  • Pouria Hemi  · 技术社区  · 6 年前

    version 3.1.4 不能使用 ?attr/actionBarSize xml格式

    3 回复  |  直到 6 年前
        1
  •  3
  •   IntelliJ Amiya    6 年前

    ?android:attr/actionBarSize
    

    XML格式

    android:layout_height="?android:attr/actionBarSize"
    
        2
  •  1
  •   Khemraj Sharma    6 年前

    你可以用 ?attr/actionBarSize ?属性/操作栏大小 . 几乎每个android开发人员在as3+中都遇到过这个问题。

    解决方案

    • 关闭项目

    已解决!:)

    android:layout_height="?actionBarSize"
    android:layout_height="?android:actionBarSize"
    android:layout_height="?attr/actionBarSize"
    

    相关问题:

    Why does Android Studio highlight "Theme" red in styles.xml?

    Cannot resolve symbol Theme, ThemeOverlay

        3
  •  0
  •   Faysal Ahmed    6 年前

    你应该用这个

    android:layout_height="?android:attr/actionBarSize"
    

    而不是

    android:layout_height="?attr/actionBarSize"