Your library exoplayer2 should not interrupt with my exoplayer2. Please do some thing
This isn't how Android (really, Java) works. It's just not true that if you use library X then you can use part of library X's namespace without consequences.
The version of exoplayer2 that GeckoView is using is both old and has been modified, so it's really not possible to share a copy of that code with consumers. That means we can either:
- rename the package space for GeckoView's exoplayer2;
- make you, the consumer, rename the package space for your exoplayer2.
I think 1) makes GV a better ecosystem participant. This should be the long-term goal: it looks like a big find-and-replace, followed by some manual testing.
I think 2) is possible right now: look into "shadow JARs"; I've been impressed with https://imperceptiblethoughts.com/shadow/ (although I haven't used it). That is, mangle your namespace such that you avoid this problem, 'cuz GV isn't going to do this quickly. (But I'd review a patch, if one was put forward!)
N.b.: if GV ever stops vendoring exoplayer2 into the tree and starts consuming exoplayer2 from a Maven publication, we should start shadow-relocating our version of exoplayer2 (or accept that consumers will change the version out from underneath us, which isn't really a bad thing).
Thanks for the bug report -- this is a thing that the GV team haven't really needed to think of yet!
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: build conflict with com.google.android.exoplayer2 → Rename com.google.android.exoplayer2 in mobile/android to not conflict with consumer's exoplayer2 version