Search code examples
androidcordovazxing

duplicate entry: com/google/zxing/aztec/AztecDetectorResult.class


I'm facing this issue but I don't know where to put the code to resolve it:

compile ('com.facebook.android:facebook-android-sdk:4.+'){ exclude group: 'com.google.zxing' }

I'm using Cordova and the plugins that are conflicting are facebook4 and barcodescanner according to the thread on GitHub. Does anyone have a clue ? Thank you.


Solution

  • Seems like since the new integration of zxing in the Facebook SDK, conflicts recently appeared with cordova-plugin-barcode-scanner and cordova-plugin-facebook4.

    Like stated in this thread, the issue is resolved by forcing the version of Facebook SDK to 4.25.0.

    I did this in the file project.properties in platforms/android/ by changing the line

    cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.+

    to

    cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.25.0.

    Hope this will help some :)