TeSheng
TeSheng

Reputation: 31

AndroidStudio build.gradle Plugin with id 'com.android.library' not found

Android Studio 1.4 Project build.gradle

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

gradle-wrapper.properties config:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip

Upvotes: 1

Views: 2316

Answers (2)

TeSheng
TeSheng

Reputation: 31

@Stanislav I have solved the question. The library build.gradle automatic generation 'TestCompile' method and prone to bugs.

Upvotes: 1

Stanislav
Stanislav

Reputation: 28106

Take a look at this user guide, according to it, one of the difference of the experimental plugin is:

Plugin name is com.android.model.application instead of com.android.application. Or use apply plugin: "com.android.model.library" if you want to create an Android aar library.

But according to your error, you've tried to apply it with the wrong plugin name.

Upvotes: 1

Related Questions