Android Question Error: Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/an

wizard699

Active Member
Licensed User
Longtime User
This is the complete error message:

Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/measurement/zzdz;

After this morning I've update Android SDK, the same application that yesterday goes ok in compilation ... today do not compile! This, in Debug ad Release mode.

I've already increased the Dex Memory.

Whats the problem?
 

wizard699

Active Member
Licensed User
Longtime User
More info ... configuration path

C:\Program Files\Java\jdk1.8.0_121\bin\javac.exe
D:\Android\platforms\android-28\android.jar

In software I've

#AdditionalJar: com.google.firebase:firebase-core
#AdditionalJar: com.google.firebase:firebase-config
#AdditionalJar: com.crashlytics.sdk.android:crashlytics

and I use all Firebase service (Notification, RemoteConfig, AdMob, etc).
 
Upvote 0

wizard699

Active Member
Licensed User
Longtime User
The problem in a incompatibility with FirebaseAdMob .... togheter the other Firebase Library (Analytica, Auth, Notifications, RemoteConfig)

.... And, after I've removed the FirebaseAdMob library, I've removed also

CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)

from Manifest
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
The problem in a incompatibility with FirebaseAdMob .... togheter the other Firebase Library (Analytica, Auth, Notifications, RemoteConfig)

.... And, after I've removed the FirebaseAdMob library, I've removed also

CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)

from Manifest

I use FirebaseAnalytics.GooglePlayBase, FirebaseAnalytics.Firebase, FirebaseAnalytics.FirebaseAnalytics & FirebaseAdMob.FirebaseAds together along with Crashlytics & have no problems, so if it is a conflict it might be in the Auth, Notifications or RemoteConfig libraries.

Oh - are you using DonManfred's Firebase RemoteConfig library? If so, I don't think you need the
B4X:
#AdditionalJar: com.google.firebase:firebase-core
because I read in the library thread that he added the @DependsOn to the library.

- Colin.
 
Upvote 0

wizard699

Active Member
Licensed User
Longtime User
Yes, I think so.
But, I've tested now and the conflict is between FirebaseAdMob and Core. The only two libraries present in test-project.

How it's possibile to resolve?
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Sorry - I didn't read your first post properly. You've had similar issues at least once before after updating the SDK, so you probably need to make sure that all the Firebase components were updated properly. To refresh your memory, you might want to refer back to this thread -> https://www.b4x.com/android/forum/threads/crashlytics-error.96906/

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Btw - I have FirebaseAdMob & Core running in multiple apps with no problems. It's probably that one or the other of those components hasn't been updated properly.

- Colin.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
i update, and have a same problem, is possible know the last update from sdk and undo it? log or similar?... i use the utility SDKManager,....

upload_2018-11-3_23-6-17.png
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
I check a clean project only with a FirebaseAdMob 1.52 and result error:

upload_2018-11-3_23-48-21.png


i think the problem is about that:

upload_2018-11-4_0-4-43.png
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've added these two components to the list of recommended components:
B4X:
com.google.android.gms:play-services-measurement-sdk
com.google.android.gms:play-services-measurement-sdk-api

A project with FirebaseAdmob compiles fine here. No need to add any #AdditionalJar.

@wizard699 please upload your test project if you are still unable to compile.
 
Upvote 0

wizard699

Active Member
Licensed User
Longtime User
Hi Erel. After installed your recommended components ... all projects with FirebaseAdMob goes OK!!!
Thanks to scsjc.
Thanks all!!!
 
Upvote 0
Top