Exclude Package From Gradle Dependency

前端 未结 2 1900
执念已碎
执念已碎 2021-01-19 00:44

I\'m experiencing an issue where multiple versions of the same class are showing up in my classpath. The class in question is javax.ws.rs.core.UriBuilder. The

2条回答
  •  离开以前
    2021-01-19 01:32

    You can exclude an transitive dependency module like this:

       compile ('org.glassfish.jersey.core:jersey-client:2.17') {
          exclude group: 'javax.ws.rs'
          exclude module: 'javax.ws.rs-api'
       }
    

    ref: 50.4.7 here

提交回复
热议问题