導入開源項目的時候老是報這個錯
Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found
解決辦法:
首先在Project下那個build.grade里面添加全局依賴
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0' //1.自動化maven打包插件 classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' //2.自動上傳至Bintray平台插件 classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
按順序來,先添加
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
添加完之后同步下,Android Studio下面的Event Log會出現com.jfrog.bintray not found的錯誤提示,maven那個錯誤提示已經沒有了
這時候再添加
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0"
點同步,等待同步完成
