Android Question Uncaught translation error: already added: Lcom/google/android/gms/common/util/VisibleForTesting

RichyK68

Active Member
Licensed User
Hi,

I'm trying to update my project to use Firebase Messaging. I'm using B4A 9.00 and Firebase Notifications 1.21, and targeting API 28. I've managed to overcome a 'no virtual method subscribetotopic' issue, and I'm now targeting API 28 not 27 after getting 'ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings' error on compile. I'm now getting this error now that I'm targeting API 28.

B4A Version: 9.00
Parsing code. (0.03s)
Building folders structure. (0.76s)
Compiling code. (1.94s)
Compiling layouts code. (0.72s)
Organizing libraries. (0.00s)
Generating R file. (0.37s)
Compiling debugger engine code. (3.53s)
Compiling generated Java code. (14.54s)
Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/util/VisibleForTesting;
1 error; aborting
Can anybody advise on what I'm doing wrong? I've looked for duplicate jars but cannot find any although that apparently is the cause. Some pointers would be really helpful.

Thanks all,

Richard
 

Erel

Administrator
Staff member
Licensed User
Create a new project with the same list of libraries. Do you get this error? Which libraries are referenced? Try to remove some until the error disappears.
 

RichyK68

Active Member
Licensed User
Analytics v2.01 is clashing with FirebaseNotifications v.121, if I remove one or the other it compiles but I need them both. What's the solution, if any?

Richard
 

RichyK68

Active Member
Licensed User
I've converted it to use FirebaseAnalytics rather than the Analyics library and that solved the issue. Thanks!
 
Top