16

我正在尝试将 ExoPlayer 库导入我的 Android Studio 项目。我用几种方法尝试了几次(直接用 GRADLE 导入),作为模块导入,复制粘贴,我得到了同样的错误:

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

在库 gradle 中,我找到了应用插件行:

apply plugin: 'bintray-release'

搜索库并将其应用于依赖项后,我仍然收到错误:

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

任何想法我该如何解决这个问题?

4

1 回答 1

27

看起来 gradle 在所有指定的存储库中都找不到这个插件。ExoPlayer 在根项目中指定 buildscript 存储库,因此您也应该这样做。

在你的根build.gradle确保buildscript部分包含jcenter()存储库和'andcom.novoda:bintray-release:0.2.7'类路径:

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
    }
}
于 2015-04-21T15:52:25.267 回答