BlinkID / blinkid-react-native

ID scanning for cross-platform apps built with ReactNative.
176 stars 59 forks source link

Android build fails, duplicate Program type already present: io.invertase.firebase.database.RNFirebaseDatabaseReference$DataSnapshotToMapAsyncTask #137

Open medzz123 opened 4 years ago

medzz123 commented 4 years ago

Followed the docs installing the sdk.

It works fine for iOs, but for android it shows this error when trying to build:

 * What went wrong:
Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 
  Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
  Program type already present: io.invertase.firebase.database.RNFirebaseDatabaseReference$DataSnapshotToMapAsyncTask

I tried removing manual linking, but still doesn't work.

My react native project includes implementation project(':react-native-firebase') , which could be causing this issues.

i1E commented 4 years ago

HI @mahedihs1997,

probably this error is not caused by our library because it does not use firebase as dependency (nor the RNFirebaseDatabaseReference$DataSnapshotToMapAsyncTask). Please try to clean build the project.