Error: (1, 0) Plugin with id 'com.android.application' not found when doing project Sync

0
    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "app.teste"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.android.support:design:24.0.0'
    compile 'com.android.support:support-v4:24.0.+'
    compile'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'

}

I'm trying to do Sync in my project and this error is appearing:
    Error: (1, 0) Plugin with id 'com.android.application' not found. Open File

Someone can help me please.

    
asked by anonymous 25.08.2016 / 18:03

1 answer

0

You need to check out your root build.gradle, which is outside the / app folder.

It has to be this way:

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

allprojects {
    repositories {
        jcenter()
    }
}

If it does not work, put this file instead of this build.gradle you posted.

    
25.08.2016 / 18:42