首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何修复id为'com.github.dcendents.android-maven‘的插件未找到。在android studio中

如何修复id为'com.github.dcendents.android-maven‘的插件未找到。在android studio中
EN

Stack Overflow用户
提问于 2015-03-05 14:03:34
回答 16查看 71.1K关注 0票数 42

我正在android studio中创建一个android应用程序。我正在向我的项目中添加一个库,该库是从here下载的。当我将这个库添加到我的项目中时,它显示了一个名为的错误“error:(2,0) Plugin with id 'com.github.dcendents.android-maven‘not found."。请告诉我怎么修。

EN

回答 16

Stack Overflow用户

发布于 2015-08-02 15:34:42

在顶级build.gradle依赖项中,粘贴以下类路径。我想知道为什么我不能在网站上看到这种方法。不管怎样,我用这种方式修复了它。

dependencies {
    //YOUR DEPEDENCIES
    classpath 'com.github.dcendents:android-maven-plugin:1.2'
    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
票数 48
EN

Stack Overflow用户

发布于 2017-03-07 18:13:59

这里有两个场景:

如果您在模块级gradle中使用apply plugin: 'com.github.dcendents.android-maven',请使用

此插件通常用于将您的库项目分发和上传到bintaray

在这种情况下,您所要做的就是使用gradle插件maven-gradle-plugin.的正确组合

以下版本的组合对我来说是有效的:

项目级gradle内部

classpath 'com.android.tools.build:gradle:2.3.0+'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

在模块级gradle中:apply plugin: 'com.github.dcendents.android-maven'

您可以从Github查看兼容版本列表

  1. 如果您不使用它,只需移除

类路径'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0‘类路径'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

apply plugin: com.github.dcendents.android-maven
票数 24
EN

Stack Overflow用户

发布于 2015-11-07 21:22:57

只需删除build.gradle开头的“应用插件:'android-maven'”行即可。

apply plugin: 'com.android.application'
apply plugin: 'android-maven'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

这个项目不需要maven。

票数 11
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28871084

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档