Cannot resolve symbol '?attr/actionBarSize' after updating Android Studio from 2.3 to 3.0 for buildToolsVersion '26.0.2'

后端 未结 16 2191
旧巷少年郎
旧巷少年郎 2021-01-30 08:00

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         


        
16条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-30 08:19

    my problem solved by changing compileSdkVersion and targetSdkVersion from 26 to the last version 27, also u need to upgrade ur dependencies to 27.

    android {
        compileSdkVersion 27
        defaultConfig {
            applicationId "com......"
            minSdkVersion 15
            targetSdkVersion 27
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:27.1.0'
        implementation 'com.android.support:design:27.1.0'
    }
    

    hope this solve ur problem too :)

提交回复
热议问题