After adding ExoPlayer dependencies com.google.common is not longer available.

If you remove ExoPlayer dependencies the package is avaiable.
Add CameraX dependencies
Add ExoPlayer dependencies
Example Repo with issue
This repo has 2 commits. ExoPlayer dependencies are added in the last one.
2.12.0
Android Studio 4.0.1
Why is this happening?
Thanks for the example project, I can repro your problem.
I believe this is related to Guava publishing ListenableFuture in both com.google.guava:listenablefuture:1.0 and com.google.guava:guava:XX.X-android. This risks causing clashes (different bytecode for the same class name), so they created com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava which com.google.guava:guava:XX.X-android depends on. This 9999.0 dependency is empty, it doesn't actually contain the ListenableFuture interface.
There's some more info about this in the Duplication troubles section here: https://blog.gradle.org/guava
It looks like CameraX declares com.google.guava:listenablefuture:1.0 as an api dependency - meaning it's visible to libraries depending on CameraX (i.e. your app).
ExoPlayer 2.12.0 declares com.google.guava:guava:27.1-android as an implementation dependency - meaning it's not visible to your app.
Gradle's version resolution "correctly" replaces CameraX's listenablefuture:1.0 with listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (via ExoPlayer's Guava dep). However, since this dep is actually empty this suddenly means your app can't see the ListenableFuture class any more (hence the build errors).
You can fix this by directly depending on Guava from your app's build.gradle:
// Guava
implementation 'com.google.guava:guava:29.0-android'
Here again just to say thank you @icbaker. Your answer was perfect.
Most helpful comment
Thanks for the example project, I can repro your problem.
I believe this is related to Guava publishing
ListenableFuturein bothcom.google.guava:listenablefuture:1.0andcom.google.guava:guava:XX.X-android. This risks causing clashes (different bytecode for the same class name), so they createdcom.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guavawhichcom.google.guava:guava:XX.X-androiddepends on. This 9999.0 dependency is empty, it doesn't actually contain theListenableFutureinterface.There's some more info about this in the Duplication troubles section here: https://blog.gradle.org/guava
It looks like CameraX declares
com.google.guava:listenablefuture:1.0as anapidependency - meaning it's visible to libraries depending on CameraX (i.e. your app).ExoPlayer 2.12.0 declares
com.google.guava:guava:27.1-androidas animplementationdependency - meaning it's not visible to your app.Gradle's version resolution "correctly" replaces CameraX's
listenablefuture:1.0withlistenablefuture:9999.0-empty-to-avoid-conflict-with-guava(via ExoPlayer's Guava dep). However, since this dep is actually empty this suddenly means your app can't see theListenableFutureclass any more (hence the build errors).You can fix this by directly depending on Guava from your app's
build.gradle: