Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access class 'com.google.common.util.concurrent.ListenableFuture'. Check your module classpath for missing or conflicting dependencies #7905

Closed
mueller-ma opened this issue Sep 14, 2020 · 2 comments
Assignees
Labels

Comments

@mueller-ma
Copy link

[REQUIRED] Issue description

I'm using work manager 2.4.0 and exoplayer 2.11.8 in an app: https://github.com/openhab/openhab-android/blob/master/mobile/build.gradle
When I want to bump the exoplayer version to 2.12.0 the build fails: Cannot access class 'com.google.common.util.concurrent.ListenableFuture'. Check your module classpath for missing or conflicting dependencies at WorkManager#getWorkInfosForUniqueWork().

[REQUIRED] Reproduction steps

Bump version from 2.11.8 to 2.12.0

[REQUIRED] Link to test content

openhab/openhab-android#2204

[REQUIRED] A full bug report captured from the device

This is a build issue

[REQUIRED] Version of ExoPlayer being used

2.12.0

[REQUIRED] Device(s) and version(s) of Android being used

This is a build issue

@icbaker
Copy link
Collaborator

icbaker commented Sep 15, 2020

Ah sorry for this - there's a bit more detail about what's going on here in a blog by Gradle: https://blog.gradle.org/guava

There are a couple of options for you to fix this:

  1. Add a dep from your module on Guava (this is how we resolved the same error in the exo-workmanager extension: 1f12542)
  2. Use the missing-metadata-guava Gradle plugin described in the blog in your module.

The 3rd option is for ExoPlayer to export Guava as an api dependency from all our modules, but we don't really want to do this (see 'benefits' of implementation deps: https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_separation).

@mueller-ma
Copy link
Author

I added the plugin from the blog post to the app. Thanks for this hint.

ojw28 pushed a commit that referenced this issue Oct 17, 2020
The 'implementation' dependency causes problems when resolving
ListenableFuture in contexts that also include the
com.google.guava:listenablefuture:1.0 dependency.

Issue: #7905
Issue: #7997
Issue: #7993
PiperOrigin-RevId: 337093024
ojw28 pushed a commit that referenced this issue Oct 21, 2020
The 'implementation' dependency causes problems when resolving
ListenableFuture in contexts that also include the
com.google.guava:listenablefuture:1.0 dependency.

Issue: #7905
Issue: #7997
Issue: #7993
PiperOrigin-RevId: 337093024
@google google locked and limited conversation to collaborators Nov 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants