0

buile.gradle file(project):

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


}
}
allprojects {
repositories {
    jcenter()
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:6.5.87'
}

buld.gradle file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.projectname.act"
    minSdkVersion 11
    targetSdkVersion 21
}

buildTypes {
    release {
        minifyEnabled false
   proguardFiles getDefaultProguardFile('proguard-android.txt'),     'proguard-rules.txt'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.google.android.gms:play-services:+'
}

Error found:

Error:(19, 0) Gradle DSL method not found: 'compile()' Possible causes:

  • The project 'projectname' may be using a version of Gradle that does not contain the method. Gradle settings
  • The build file may be missing a Gradle plugin. Apply Gradle plugin
  • Mansi Bhatt
    • 214
    • 3
    • 12

    0 Answers0