Error compiling project.BuildGradle

1

I uninstalled android studio and installed again and now I can not compile my project.

The following message appears:

 Error:Plugin with id 'com.android.application' not found.

build.gradle :

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


allprojects {
    repositories {
        jcenter()
    }
}
apply plugin: 'com.android.application'
android {
    compileSdkVersion 22
    buildToolsVersion "22.0.2"

    defaultConfig {
        applicationId "contactorganizer.introcode.or.myapplication"
        minSdkVersion 8
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.2'
}
    
asked by anonymous 22.01.2016 / 10:49

1 answer

1

There is an error in buildscript

Try this:

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

Add classpath before declaring dependencies .

    
22.01.2016 / 11:20