Error: AGPBI: Program type already present: com.google.android.gms.auth.api.signin.internal.zzg
10,874
Solution 1
I had the same problem.
Changed by changing
implementation 'com.google.firebase:firebase-auth:11.0.6'
to
implementation 'com.google.firebase:firebase-auth:11.2.2'
The issue happened after adding the firebase plugin at Android 3.
Android Plugin version automatically adds
implementation 'com.google.firebase:firebase-auth:11.0.6'
but we need to change the version to 11.2.2
Solution 2
Go back to 11.2.2
version of firebase.
For example:
From:
'com.google.firebase:firebase-core:11.4.0'
to
'com.google.firebase:firebase-core:11.2.2'
UPDATE
Even 11.6.0 of firebase has been released, this problem still exist. I found out adding
compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
problem disappears.
Solution 3
FWIW I had a similar error with a different library I use in my app, and the workaround for me was setting android.enableD8=false
in gradle.properties.
Or upgrading from AGP 3.0.0-beta3 to beta6.
Author by
Ralf Wickum
Updated on June 26, 2022Comments
-
Ralf Wickum almost 2 years
In my Adrdoi app, where I use Google Login and Firebase Cloud Messaging, I get this error message:
AGPBI: {"kind":"error","text":"Program type already present: com.google.android.gms.auth.api.signin.internal.zzg","sources":[{}]}
Does that mean that the google auth lib was already used somewhere else? Whats that from?
-
Ralf Wickum over 6 yearsAlready Android Studio 3.0.0-Beta 6. Also included
android.enableD8=false
in gradle.proterties -
Narendra Singh about 6 yearsbut, isn't
android.enableD8=false
deprecated? -
Eric about 6 years@NarendraJi yes, but it wasn't deprecated in September 2017 when I wrote this answer. I'm not sure when this issue was fixed but I'm no longer having the issue and I'm on AGP 3.2.0-alpha08
-
Martin Zeitler about 6 years
The option 'android.enableD8' is deprecated and should not be used anymore. Use 'android.enableD8=true' to remove this warning.
-
Nabzi over 5 yearsI had the same problem ,I had 'com.google.android.gms:play-services-auth:15.0.0' dependency . Then I just removed this dependency and the problem was solved/