After updating Android Studio from 2.3 to 3.0 I changed buildToolsVersion
from 26.0.0 to 26.0.2 and after then I am getting this error:
Cannot reso
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.
Maybe you hava upgraded the version of gradle. when my gradle version is 4.4 and plugin version is 3.1.1.It is ok.
Good day, I know this is a bit late.
but I have encountered this one too, when I updated to Android Studio 3.0
what i did is I changed
compile 'com.android.support:support-v4:26.1.0'
to
implementation 'com.android.support:support-v4:26.1.0'
Hope it can help somebody.
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".
this work:
delete all file in $HOME/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar
Change R.attr.actionBarSize
to androidx.appcompat.R.attr.actionBarSize
.