How to resolve duplicated gradle Dependency issues

后端 未结 4 1651
情话喂你
情话喂你 2021-02-04 01:33

I have tried to test my code with robolectric. Problem is that it has duplicated References. e.g.

java.lang.RuntimeException: java.lang.RuntimeException: Duplica         


        
4条回答
  •  醉酒成梦
    2021-02-04 02:06

    This probably could be written in more general way:

    testImplementation ("org.robolectric:robolectric:4.3") {
        exclude group "org.apache.maven.wagon"
        exclude group "org.apache.maven"
    }
    

    or even:

    testImplementation ("org.robolectric:robolectric:4.3") {
        exclude group: "org.apache.maven", name: "maven-ant-tasks"
    }
    

    because it is maven-ant-tasks of pluginapi, which pulls in org.apache.maven dependencies.

提交回复
热议问题