我正在尝试将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行:
apply plugin: 'bintray-release'
搜索库并将其应用于依赖项之后,我仍然遇到错误:
dependencies {
compile 'com.novoda:bintray-release:0.2.10'
}
任何Ideea如何解决这个问题?
答案 0 :(得分:27)
看起来gradle无法在所有指定的存储库中找到此插件。 ExoPlayer在根项目中指定了构建脚本存储库,因此您也应该这样做。
在您的根目录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
}
}