After Updating Android studio to 3.1.2 , I get “Failed to load AppCompat ActionBar with unknown error. ”

前端 未结 9 2066
旧巷少年郎
旧巷少年郎 2020-12-31 14:54

I tried looking other similar questions on stackoverflow, they advice us to changw version of \"buildToolsVersion\" but I dont see word like that in my gradle file.

9条回答
  •  暖寄归人
    2020-12-31 15:12

    module app gradle file looks like this...In your file you are missing buildToolsVersion, adding this may help you

      apply plugin: 'com.android.application'
    
     android {
      //changes
      compileSdkVersion 26
    buildToolsVersion "27.0.3"
     defaultConfig {
        applicationId "com.example.dhruv.testhello"
       minSdkVersion 24
        targetSdkVersion 26
        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'])
    
    //changes
    compile 'com.android.support:appcompat-v7:26.0.2'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso- 
    core:3.0.2'
     }
    

提交回复
热议问题