Gradle duplicate classes in dependencies

前端 未结 1 1252
南笙
南笙 2021-01-21 03:58

I am building an android application and am using recaptcha and easywsdl repositories. These both repositories contain okhttp and okio jars and I get error while starting app th

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-21 04:06

    Gradle does not solve conflicts that arise from two different jars having shared classes. If you have two jars with same artifactId and different version, it will only take one of them. If you have two different artifactId's, gradle cannot do anything about it.

    If the simultaneous use of the two jars makes your application crash, you can only use one of them. If your application doesn't run with only one of the jars, it probably cannot be built in the way you intend it.

    By the way: This is not a problem of having multiple repositories, but a problem of having clashing jars on the classpath.

    0 讨论(0)
提交回复
热议问题