AutoAnnotation error after updating to firebase-messaging:17.5.0

Today I updated from:

implementation 'com.google.firebase:firebase-messaging:17.4.0'


implementation 'com.google.firebase:firebase-messaging:17.5.0'

And I get this build error:

Error: Program type already present: com.google.auto.value.AutoAnnotation

All my other dependencies are up to date.


- - Source


answered 2 mon ago Srikar Reddy #1

The issue is multiple dependencies are adding the library Auto Value creating a conflict.

Try to figure out which dependencies are adding the Auto Value library and remove them using exclude flag.

implementation ('com.google.firebase:firebase-messaging:17.5.0') {
    exclude module: 'com.google.auto.value'

For more info, take a look at a similar question -> What does "Program type already present" mean?

answered 1 week ago RJB #2

The problem was google translate.

I did like Srikar suggested, just with translate. And used "exclude group". Like this:

implementation('com.google.cloud:google-cloud-translate:0.5.0') {
    exclude group: 'io.grpc', module: 'grpc-all'
    exclude group: 'com.google.protobuf', module: 'protobuf-java'
    exclude group: 'com.google.api-client', module: 'google-api-client-appengine'
    exclude group: 'com.google.auto.value'

comments powered by Disqus