0

Today I updated from:

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

to:

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.

Thanks

KENdi
  • 7,576
  • 2
  • 16
  • 31
RJB
  • 1,704
  • 23
  • 50

2 Answers2

0

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?

Srikar Reddy
  • 3,650
  • 4
  • 36
  • 58
0

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'
}
RJB
  • 1,704
  • 23
  • 50