0

I am getting following conflicts for okio library in my sprint boot project.

enter image description here

I am not not sure how to read this. Specifically:

  1. What does conflict actually mean here. What is conflicting with what?
  2. Why is 1.6.0 is conflicting with 1.6.0
  3. What does Scopes mean (6 scopes , 4 scopes) etc..

How do I resolve this in my gradle project. Current in my build.gradle I have

implementation "org.apache.commons:commons-vfs2:2.9.0"
implementation 'io.fabric8:kubernetes-client:6.3.1'

My server fails to start with a NoSuchFieldError within a class in Okio library. How can I go about resolving this? None of this is my direct code issue is happening in the okio which is the transitive dependency of above two libraries.

1 Answer 1

0

It is having same library but two version of it on classpath, so at run time any one would be picked.

And if the version has some breaking changes, it won't work. You have to put a constraint to have only one version.

You can refer to How Gradle handles conflicts? for more information.

1
  • 1
    what what if vfs2 only works with version 1.6.0 of okio and kubernetes client only works with 2.8.0 of okio ? In that case, does that mean that I won't be able use these two libraries (vfs2 and kubernetes client) together in my project? – Commented Jan 12, 2023 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.