【发布时间】:2018-04-12 02:18:37
【问题描述】:
将 Android Studio 从 2.3 更新到 3.0 后,我将 buildToolsVersion 从 26.0.0 更改为 26.0.2,然后我收到此错误:
Cannot resolve symbol '?attr/actionBarSize
Xml 代码:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextColor="@android:color/white"/>
依赖关系:
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
【问题讨论】:
-
也许你已经升级了gradle的版本。
-
尝试点击 Build > Clean Project
标签: android android-layout android-actionbar android-studio-3.0