无法应用插件,Android的工作室 [英] Failed to apply plugin Android Studio

查看:1400
本文介绍了无法应用插件,Android的工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图导入ExoPlayer库到我的Andr​​oid Studio项目。我已经tryed几次用多种方法(直接进口与摇篮),进口为模块,复制粘贴,我得到了同样的错误:

I am trying to import ExoPlayer library into my Android Studio project. I have tryed few times with several methods ( importing direct with GRADLE ), import as module, copy paste it, I get the same error:

Error:(15) A problem occurred evaluating project ':..:ExoPlayer:library'.
> Failed to apply plugin [id 'bintray-release']
   > Plugin with id 'bintray-release' not found.

在库摇篮,我发现应用插件线:

In library gradle I found the apply plugin line:

apply plugin: 'bintray-release'

在搜索库,并将其应用到依赖后,我还是得到了错误:

After Searching the library and apply it to dependencies I still got the error:

dependencies {
    compile 'com.novoda:bintray-release:0.2.10'
}

任何IDEEA我怎么能解决这个问题?

Any Ideea how can I solve this problem ?

推荐答案

它看起来像摇篮找不到这个插件在所有指定的仓库。 ExoPlayer指定根项目buildscript库,所以这就是你应该做的了。

It looks like gradle could not find this plugin in all specified repositories. ExoPlayer specifies buildscript repositories in the root project, so that's what you should do too.

在你的根 build.gradle 确认 buildscript 部分包含 jcenter()库和'andcom.novoda:bintray释放:0.2.7类路径:

In your root build.gradle make sure buildscript section contains jcenter() repository and 'andcom.novoda:bintray-release:0.2.7' classpath:

buildscript {
    repositories {
        ...... <- whatever you have now
        jcenter() <- make sure this one is there
    }
    dependencies {
        ...... <- whaterver you have now
        classpath 'com.novoda:bintray-release:0.2.7' <- make sure this one is there
    }
}

这篇关于无法应用插件,Android的工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆