Cannot resolve symbol '?attr/actionBarSize' after updating Android Studio from 2.3 to 3.0 for buildToolsVersion '26.0.2'
Nothing helped, but changing:
?attr/actionBarSize
to ?android:attr/actionBarSize
did the job.
That's actually a bug in few versions. Even if you won't fix it, Android will automatically fix it at runtime.
Update all your library versions to 26.1.0
(to the most recent version) and also add:
compile 'com.android.support:support-v4:26.1.0'
if you are using Android Studio 3.0.0 and above then use
implementation 'com.android.support:support-v4:26.1.0'
Sync your project and the error will automatically resolve because ?attr/actionBarSize
is part of v4
library.
In the project directory hierarchy switch "Android" to "Project". Then delete a folder ".idea/libraries", only "libraries". Select an option from the menu "File -> Invalidate Caches / Restart... -> Invalidate and Restart".