Bitmovin and Exoplayer conflicting dependencies

1.1k views Asked by At

I am using both Exoplayer and Bitmovin libraries in my project

compile "com.google.android.exoplayer:exoplayer:$rootConfiguration.exoPlayerVersion"
compile "com.bitmovin.analytics:collector:$rootConfiguration.bitmovinVersion"

and:

exoPlayerVersion = '2.8.4'
bitmovinVersion = '1.3.8'

When I run my app it gives me this error

`AGPBI: {"kind":"error","text":"Program type already present: `com.google.android.exoplayer2.source.hls.BuildConfig","sources":[{}],"tool":"D8"}

How can I exclude Exoplayer files from Bitmovin?

P.S. It was working fine until version 1.2.0

2

There are 2 answers

5
Keivan Esbati On

To Exoplayer files from Bitmovin library just change your dependency like this:

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'
    }
0
Norman Daniel Vicente On

To enable the coexistence of both, the Bitmovin Player Android SDK is also available as a separate artifact that evades namespace collisions and is marked with the +jason suffix in the player version:

https://bitmovin.com/docs/player/faqs/can-i-use-exoplayer-and-the-bitmovin-player-android-sdk-in-the-same-project