我在项目中同时使用了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"}
如何从Bitmovin
中排除Exoplayer
文件?
附言直到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'
}
为了实现两者的共存,Bitmovin Player Android SDK也可以作为一个单独的工件使用,以避免命名空间冲突,并在播放器版本中标有+jason后缀:
https://bitmovin.com/docs/player/faqs/can-i-use-exoplayer-and-the-bitmovin-player-android-sdk-in-the-same-project