journeyapps / zxing-android-embedded

Barcode scanner library for Android, based on the ZXing decoder
https://journeyapps.com/
Apache License 2.0
5.68k stars 1.26k forks source link

IntentIntegrator is defined multiple times #699

Closed PekinioElFamoso closed 2 years ago

PekinioElFamoso commented 2 years ago

Description of the problem:

Hey can i have some help , i got this error : Type com.google.zxing.integration.android.IntentIntegrator is defined multiple times:

I have tried many things without success ...

minSdkVersion 24
    targetSdkVersion 30
rkistner commented 2 years ago

That indicates you have multiple conflicting copies of the library, or a combination of this library and com.google.zxing:android-integration.

  1. Which version of this library are you using?
  2. What other dependencies do you have?
PekinioElFamoso commented 2 years ago

i use this dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.3' implementation 'com.journeyapps:zxing-android-embedded:4.3.0' implementation 'com.google.android.material:material:1.4.0' implementation 'com.google.android.play:core:1.10.3' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation files('libs/gson-2.8.5.jar') implementation 'com.android.volley:volley:1.2.1' implementation project(path: ':otpview') }

rkistner commented 2 years ago

Nothing standing out in those dependencies, unless there is a conflicting .jar file in the libs folder.

Does the error log give any indication on where the duplicates are defined?

PekinioElFamoso commented 2 years ago

I just have this but I don't understand...

Except a json lib nothing

`Type com.google.zxing.integration.android.IntentIntegrator is defined multiple times:

C:\Users\me\AndroidStudioProjects\wadaco\app\build\intermediates\project_dex_archive\release\out\com\google\zxing\integration\android\IntentIntegrator.dex,

C:\Users\me\AndroidStudioProjects\wadaco\app\build\intermediates\external_libs_dex\release\mergeExtDexRelease\classes.dex`

rkistner commented 2 years ago

I don't think this one should be there:

build\intermediates\project_dex_archive\release\out\com\google\zxing\integration\android\IntentIntegrator.dex

Do you have an IntentIntegrator.java source file somewhere? (You should not have that in your project)

If it still fails, also try doing a clean build.

PekinioElFamoso commented 2 years ago

I don't think this one should be there:

build\intermediates\project_dex_archive\release\out\com\google\zxing\integration\android\IntentIntegrator.dex

Do you have an IntentIntegrator.java source file somewhere? (You should not have that in your project)

If it still fails, also try doing a clean build.

Ok is good working THX