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

Posted in :

從網路上下載了一個範例,開啟時會顯示這個錯誤:
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:

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *