Android Studio: Plugin with id 'android-library' not found

新导入Android studio项目时,会遇到如标题所示的错误。解决办法参考StackOverFlow上面帖子所示:

Instruct Gradle to download Android plugin from Maven Central repository.

You do it by pasting the following code at the beginning of the Gradle build file:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.1'
    }
}
Replace version string 1.0.+ with the latest version. Released versions of Gradle plugin can be found in official Maven Repository or on MVNRepository artifact search.

http://stackoverflow.com/questions/18153739/android-studio-plugin-with-id-android-library-not-found

你可能感兴趣的:(Android开发主线)