1. 程式人生 > >[Android] Plugin with id ‘android-library’ not found

[Android] Plugin with id ‘android-library’ not found

從網路上下載了一個範例,開啟時會顯示這個錯誤:
Plugin with id ‘com.android.application’ not found.

解法:

Add the following code to the top of your build.gradle:

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

allprojects 
{ repositories { jcenter() } }

from: