I am trying to compile document scanner and get the following error aafter downloading the required files using SDK Manager.
I would just delete what I assume is the older one (16.1.0) but I found one post with a similar error HERE. And the solution there was to exclude one lib and add a couple of others. I am also concerned that the other might be used by some other program.
I did spend an hour taking several stabs at excluding one or the other of the libs by trying to guess the appropriate name based on the error but had no luck.
I also tried alternately renaming the paths to each of the duplicates but that just got me the compile error that the item could not be found.
I also noticed that the original document scanner post had:
but the example had only:
I mention this in case it has something to do with the problem but I am assuming the updated example no longer needs these.
Thanks for any help.
PS: If someone understands what is going on here I would also very much appreciate an explanation in addition to a solution, thanks.
B4X:
Dex code (0.76s)
Dex merge Error
Error in c:\android\tools\..\extras\b4a_remote\com\google\firebase\firebase-encoders-json\16.1.0\unpacked-firebase-encoders-json-16.1.0\jars\classes.zip:classes.dex:
Type com.google.firebase.encoders.DataEncoder is defined multiple times: c:\android\tools\..\extras\b4a_remote\com\google\firebase\firebase-encoders-json\16.1.0\unpacked-firebase-encoders-json-16.1.0\jars\classes.zip:classes.dex, c:\android\tools\..\extras\b4a_remote\com\google\firebase\firebase-encoders\17.0.0\firebase-encoders-17.0.0.zip:classes.dex
Compilation failed
I did spend an hour taking several stabs at excluding one or the other of the libs by trying to guess the appropriate name based on the error but had no luck.
I also tried alternately renaming the paths to each of the duplicates but that just got me the compile error that the item could not be found.
I also noticed that the original document scanner post had:
B4X:
#AdditionalJar: com.google.android.gms:play-services-mlkit-document-scanner
#AdditionalJar: kotlin-stdlib-1.6.10
#AdditionalJar: androidx.arch.core:core-runtime
B4X:
#AdditionalJar: com.google.android.gms:play-services-mlkit-document-scanner
#MultiDex: True
Thanks for any help.
PS: If someone understands what is going on here I would also very much appreciate an explanation in addition to a solution, thanks.