您的位置:首页 > 移动开发 > Android开发

Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found.

2016-07-04 15:13 495 查看


在github上下载的开源项目出现这个问题

Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found.

引起这个错误的原因是因为你在,AndroidStudio的model中的

(注意是model中的,不是Project中的。)build.gradle文件中有一行
apply plugin: 'com.github.dcendents.android-maven'
而你没有在buildscript中制定这个的位置。

所以,你应该到你项目的(也就是Project目录下)找到build.gradle 文件
修改buildscript如下
buildscript {
repositories {
jcenter()
}
dependencies {
//。。。你的其他配置

//添加这行
classpath 'com.github.dcendents:android-maven-plugin:1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: