title: Edit / Delete classes in external third party library jar files in android?
body: <p>I am using external third party libraries in my project, but the problem I am facing is, two different jar files contains a class with the same name.</p>
  
  <p><strong>Following are the libs I am using</strong></p>
  
  <ul>
  <li>jaxen-1.1-beta-2.jar</li>
  <li>jaxen-core.jar</li>
  </ul>
  
  <p>The above given jar files share a class with the same name called "<strong>DefaultNavigator.class</strong>" so because of this i am getting the following <strong>duplicate class error</strong>.</p>
  
  <p>com.android.build.api.transform.TransformException:     java.util.zip.ZipException: duplicate entry: org/jaxen/DefaultNavigator.class</p>
  
  <p>I need to know whether i can edit/delete unused classes or repeated classes given in the external third party jar files or please guide me whether i can copy only the classes that i required from all the jars and put them up in a single jar file and use. if this is possible please tell me how to do this. I am a beginner to android. Below I am attaching my build.gradle file.</p>
  
  <blockquote>
    <p>build.gradle</p>
  </blockquote>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 23
  buildToolsVersion "23.0.3"
  
  defaultConfig {
      applicationId "com.xxx.xxx.yyy"
      minSdkVersion 14
      targetSdkVersion 22
      versionCode 1
      versionName "1.0"
      multiDexEnabled true
  }
  
  configurations {
      all*.exclude group: 'com.android.support', module: 'support-v4'
  
  }
  buildTypes {
      release {
          minifyEnabled false
  proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
      }
   }
  
  }
  
  dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:23.4.0'
  compile 'com.google.android.gms:play-services-appindexing:8.1.0'
  compile 'com.android.support:support-v4:23.4.0'
  compile 'com.android.support:multidex:1.0.1'
  compile files('libs/xsdlib-1.5.jar')
  compile files('libs/relaxngDatatype-2.2.jar')
  compile files('libs/javax.xml.stream.jar')
  compile files('libs/pull-parser-2.jar')
  compile files('libs/javax.xml.bind.jar')
  compile files('libs/java-rt-jar-stubs-1.5.0.jar')
  compile files('libs/jaxen-core.jar')
  compile files('libs/jaxen-dom4j.jar')
  compile files('libs/jaxen-1.1-beta-2.jar')
  
  }
  </code></pre>