Duplicate class com.google.android.gms.internal.vision.zze found in modules

Alternatively and preferably, you should move to the new ML Kit SDK which we launched early June. The on-device APIs are considered deprecated in Firebase ML and updates / improvements are only available in the new SDK. To help with the switch, migration guides can be found here.


Add the following in build.gradle:Module

implementation 'com.google.android.gms:play-services-vision:20.0.0'

implementation 'com.google.firebase:firebase-ml-vision:24.0.3'
implementation 'com.google.firebase:firebase-ml-vision-barcode-model:16.1.1'

And in build.gradle:Project

classpath 'com.google.gms:google-services:4.3.3'

In buildscript-->dependencies.


I have same issue,if you are using firebase dependencies update following to latest version in app/build.gradle see attached process

dependencies {
 
    implementation platform('com.google.firebase:firebase-bom:29.0.0')
}

Get the latest version via the documentation https://firebase.google.com/support/release-notes/android


I had the same issue with the 24.1.0 version of firebase-ml-vision. Here is the official resolution solution :

Firebase Release Note MLKIT Self Serve Fixes

So I had to add a dependency to play-services-vision that I did not need anymore before :

implementation 'com.google.android.gms:play-services-vision:20.1.1'

I hope that they will fix it in the next versions