I have an old project that I’m trying to integrate a translator into using implementation ‘com.google.mlkit:translate:16.0.0’
When I started it, I started getting errors with DuplicateClasses:
enter image description here
as a consequence I decided to exclude androidx:
configurations {
all {
exclude group: 'androidx.core', module: 'core'
}
}
But now when I try to translate I get an error:
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/os/ConfigurationCompat;
As I understand it, if I don’t have androidx in the project, then I can’t use Google ML Kit?
Is it possible to solve this dilemma?
I tried changing Google Ml Kit versions but it didn’t help.
Dirty Deeds is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.