Error compiling project.Buildgradle

Asked

Viewed 121 times

1

I uninstalled the android studio and installed again and now I can’t 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'
}

1 answer

1

There is an error in buildscript

Try it this way:

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

Add classpath before declaring the dependencies.

  • Still no friend, still the same mistake.

  • How strange. I can reproduce here perfectly... It’s just this information you have in your Radle?

  • That same friend, with the suggested modification already included, are all the information of Gradle.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.