1

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 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

change:

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

to:

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

it might help

4 Comments

if it wont work then provide me build.gradle (module) file will if error is present there!
provide me build.gradle file i will check there
Will it be enough if I copy here? (I am newest :)
You found any solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.