NativeScript / nativescript-facebook

NativeScript plugin, wrapper of native Facebook SDK for Android and iOS
Apache License 2.0
79 stars 50 forks source link

conflict with barcode scanner #141

Closed zzzxtreme closed 5 years ago

zzzxtreme commented 5 years ago

My app uses nativescript-barcode-scanner which uses zxing.

After I added nativescript-facebook plugin, I get this error

"Program type already present: com.google.zxing.BarcodeFormat"

Curious to know if facebook plugin uses zxing ?

Wondering if anyone has any solution? any help would be greatly appreciated.

elena-p commented 5 years ago

Hi @zzzxtreme,

nativescript-facebook plugin doesn't include ZXing library explicitly. However, it wraps the native Facebook SDK for Android, which includes the ZXing library as a dependency.

It seems that the nativescript-barcodescanner plugin includes the ZXing library in their own distributed library and the two cannot get merged.

You can add these lines to your app.gradle file in app/App_Resources/Android, as suggested in a similar issue.

configurations {
    compile.exclude group: 'com.google.zxing'
}
zzzxtreme commented 5 years ago

thanks you. very much appreciated !