skip to Main Content

I am using some .jar files as Vuforia and apache for my application. When I compile the application,

I face with Program type already present: org.apache.commons.codec.BinaryDecoder and I do not know to fix it. I searched many times but could not found same example with me.

This is my dependencies:

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-annotations:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:26.1.0'
implementation files('src/main/java/Vuforia.jar')
implementation files('libs/mail.jar')
implementation files('libs/additionnal.jar')
implementation files('libs/activation.jar')
implementation files('libs/commons-io-2.6.jar')
implementation files('libs/commons-io-2.6-javadoc.jar')
implementation files('libs/commons-io-2.6-sources.jar')
implementation files('libs/commons-io-2.6-test-sources.jar')
implementation files('libs/commons-io-2.6-tests.jar')
implementation files('libs/commons-codec-1.11-javadoc.jar')
implementation files('libs/commons-codec-1.11-sources.jar')
implementation files('libs/commons-codec-1.11-test-sources.jar')
implementation files('libs/commons-codec-1.11-tests.jar')
implementation files('libs/commons-codec-1.11.jar')
implementation 'org.mnode.ical4j:ical4j:1.0.5'
implementation 'com.android.support:multidex:1.0.3'

}

Can you guys help me to fix problem?

Thank you

2

Answers


  1. change:

    implementation 'com.android.support:appcompat-v7:26.0.0'

    to:

    implementation 'com.android.support:appcompat-v7:26.1.0'
    

    it might help

    Login or Signup to reply.
  2. I experience the same error. I was using a jar which included:

    implementation files('libs/commons-io-2.6.jar')
    

    And in my app I too had included:

    implementation files('libs/commons-io-2.6.jar')
    

    So all I had to do was to remove that line from my app and not include the commons-io-2.6.jar file in my libs folder.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search