android - Error:(10, 0) gradle method not found classpath() -


hello i'm newbie android studio , imported facebook as, , first got error error:(111) cannot call getbootclasspath() before settargetinfo() called. , followed right answer here. i.e changed depencies

dependencies {     compile 'com.android.support:support-v4:[21,22)'     compile 'com.parse.bolts:bolts-android:1.1.4' } 

to

 dependencies {         classpath 'com.android.tools.build:gradle:1.1.3'     } 

and i'm getting error

   error:(10, 0) gradle dsl method not found: 'classpath()' possible causes:the project 'fiberteccpcp' may using version of gradle not contain method.         gradle settings build file may missing gradle plugin.         apply gradle plugin 

finally build.gradle file

apply plugin: 'com.android.library'  repositories {   mavencentral() }  project.group = 'com.facebook.android'  dependencies {     classpath 'com.android.tools.build:gradle:1.1.3' }  android {     compilesdkversion 21     buildtoolsversion "21.1.2"      defaultconfig {         minsdkversion 8         targetsdkversion 21     }      lintoptions {         abortonerror false     }      sourcesets {         main {             manifest.srcfile 'androidmanifest.xml'             java.srcdirs = ['src']             res.srcdirs = ['res']         }     } }  apply plugin: 'maven' apply plugin: 'signing' ...... 

how can correct this?

you have include part in buildscript block

dependencies {     classpath 'com.android.tools.build:gradle:1.1.3' } 

should be:

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

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -