Cannot get property "compileSdkVersion" to add additional properties because it does not exist

Someone please help me .... I can’t get the "compileSdkVersion" property for an additional property extension because it does not exist in Android studio.

+4
source share
2 answers

Go to "Project Files" and open the gradle assembly.

You will find something like this

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

You must add this definition:

ext {
    compileSdkVersion = 23
    buildToolsVersion = "23.0.1"
    targetSdkVersion = 21
}
0
source

I just fixed it by deleting

apply plugin: 'android-reporting'

and all is well!

0
source

All Articles