我在项目中同时使用了Exoplayer和Bitmovin库
compile "com.google.android.exoplayer:exoplayer:$rootConfiguration.exoPlayerVersion"
compile "com.bitmovin.analytics:collector:$rootConfiguration.bitmovinVersion"
和:
exoPlayerVersion = '2.8.4'
bitmovinVersion = '1.3.8'
当我运行我的应用程序时,它给了我这个错误
`AGPBI: {"kind":"error","text":"Program type already present: `com.google.android.exoplayer2.source.hls.BuildConfig","sources":[{}],"tool":"D8"}
如何从
Exoplayer
中排除Bitmovin
文件?附言直到版本1.2.0都运行良好
最佳答案
要从Exoplayer
库中生成Bitmovin
文件,只需像这样更改您的依赖项:
compile("com.bitmovin.analytics:collector:$rootConfiguration.bitmovinVersion") {
// Necessary to avoid version conflicts
exclude group: 'com.google.android.exoplayer', module: 'exoplayer'
// Or simply
exclude module: 'exoplayer'
}