cannot resolve synbol '?attr/actionBarSize'错误

<android.support.v7.widget.Toolbar
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="@color/colorPrimary"/>

升级AS到3.0.1后,并且把依赖包v7和design版本都修改到26.1.0,发现之前写的Toolbar布局中的?attr/actionBarSize报红(上面是修改后的,所以不报红了,,,),提示如标题所示错误信息。

查资料原来是这个属性是v4包中的,同时把V4包版本号改为26.1.0就可以了,小小记录一下。

猜你喜欢

转载自blog.csdn.net/wernerzeiss/article/details/79142810