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

来源:互联网 发布:js的math函数 编辑:程序博客网 时间:2024/04/28 08:48

在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    }}

1 0
原创粉丝点击