-2

I found my web project always gives a error message.

Description Resource Path Location Type Invalid classpath publish/export dependency /Users/XXXX/.gradle/caches/modules-2/files-2.1/org.apache.axis/axis-jaxrpc/1.4/b393f1f0c0d95b68c86d0b1ab2e687bb71f3c075/axis-jaxrpc-1.4.jar. The project contains another dependency with the same archive name. serverapi/api Classpath Dependency Validator Message

And check the Gradle Dependecies, there are some duplicate jars.

axis-jaxrpc-1.4.jar
axis-saaj-1.4.jar

So I create another simple project to verify this problem. Here is the gradle build file:

apply plugin: 'java'
sourceCompatibility = 1.6
sourceSets.main.java.srcDir 'src'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

repositories {  
    mavenCentral()
}

dependencies {
    compile 'axis:axis:1.4'
}

The gradle dependencies:

axis-jaxrpc-1.4.jar
axis-saaj-1.4.jar
axis-wsdl4j1.5.1.jar
axis-1.4.jar
commons-discovery-2.0.jar
commons-logging-1.0.4.jar
axis-jaxrpc-1.4.jar
axis-saaj-1.4.jar

How to fix or report this problem?

Falko
  • 17,076
  • 13
  • 60
  • 105
Chi Shin Hsu
  • 261
  • 1
  • 2
  • 12

2 Answers2

0

Use multiDexEnabled in your gradle file like this.

android {
compileSdkVersion 23
buildToolsVersion '23.0.0'
useLibrary 'org.apache.http.legacy'
defaultConfig {
    multiDexEnabled true
}
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
productFlavors {
}
}

dependencies {
compile 'com.android.support:support-annotations:23.1.1'
compile 'com.google.android.gms:play-services:8.3.0'
}
Arslan Ashraf
  • 867
  • 7
  • 12
0

Using org.apache.axis:axis:1.4 instead of axis:axis:1.4 might solve your problem.

Andreas Veithen
  • 8,868
  • 3
  • 25
  • 28