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

Could not resolve com.google.guava:guava:[15.0,). #6617

Closed
tanmaymanolkar1 opened this issue Jun 30, 2023 · 6 comments
Closed

Could not resolve com.google.guava:guava:[15.0,). #6617

tanmaymanolkar1 opened this issue Jun 30, 2023 · 6 comments

Comments

@tanmaymanolkar1
Copy link

Hi,
Iver read the release notes for https://github.com/google/guava/releases/tag/v32.1.0.

Our library depends on MapDB 3.0.8 which has a dependency on guava library:
image

This is the error I am seeing now, is there any way I could resolve it, since we are having a secondary dependency on guava.
image

Thank you for your help in advance!

@cpovirk
Copy link
Member

cpovirk commented Jun 30, 2023

Thanks.

@jjohannes is already on #6612 (comment), but I'll summon him here, too, since I don't know where the conversation will develop.

Were you able to try the suggestion in #6612 (comment)? Are you using Gradle 6?

@tanmaymanolkar1
Copy link
Author

yes I am using gradle 6

@jjohannes
Copy link
Contributor

Reposting here: For Gradle 6.x you need to set the org.gradle.jvm.environment attribute on the classpaths, if you use a library that makes use of this attribute (which Guava now does). Starting with Gradle 7 (and Android Gradle Plugin 7) the Java/Android plugins take care of that and it just works.

You can do it like this in the place where you configure the Java plugins in your build:

sourceSets.all {
  configurations.getByName(runtimeClasspathConfigurationName) {
    attributes.attribute(Attribute.of("org.gradle.jvm.environment", String), "standard-jvm")
  }
  configurations.getByName(compileClasspathConfigurationName) {
    attributes.attribute(Attribute.of("org.gradle.jvm.environment", String), "standard-jvm")
  }
}

Or you upgrade to Gradle 7 if possible.

@jjohannes
Copy link
Contributor

#6612 (comment)

@kluever
Copy link
Member

kluever commented Jul 5, 2023

These types of questions are generally better suited for StackOverflow.

@kluever kluever closed this as completed Jul 5, 2023
@cpovirk
Copy link
Member

cpovirk commented Jul 5, 2023

(Sorry, I should have given a heads-up that I asked users to report Gradle problems with 32.1.0+ here instead of Stack Overflow. I did that because those problems are likely to indicate errors in our new Gradle metadata (like the one that was addressed by 32.1.1), rather than configuration errors on their part. @jjohannes, besides having provided the metadata itself, has been taking care of bug reports.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants