The project may be using a version of Gradle that does not contain the method 'compileSdkVersion()'

Your application module's build.gradle file should look like this.

apply plugin: 'com.android.application'

android {
   compileSdkVersion 17
   buildToolsVersion "21.1.2"

defaultConfig {
     applicationId "com.opentaxi.android"
     minSdkVersion 9
     targetSdkVersion 19
  }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {

    compile project(':comtaxibulgariamap_mapsforge_044201406271417533')
    compile fileTree(include: ['*.jar'], dir: 'libs')
}

And remove these lines from your main build.gradle (in application's root) if it exists as you posted.

  ext {
      compileSdkVersion 17
      buildToolsVersion '18.1.0'
    }
    dependencies {
    }

Did you recently upgrade to Android Studio 1.0? If so, replace runProguard with minifyEnabled in your app/build.gradle.


worked for me after I added, in build.gradle (Module):

apply plugin: 'kotlin-kapt'