我在项目中同时使用了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'
    }

10-07 19:30
查看更多