无法应用插件Android Studio

我正在尝试将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中,我find了apply plugin行:

 apply plugin: 'bintray-release' 

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

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

任何Ideea如何解决这个问题?

看起来gradle无法在所有指定的存储库中find此插件。 ExoPlayer指定根项目中的buildscript存储库,这也是你应该做的。

在你的root 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 } }