duplicate class found in dependency - android

Duplicate class javax.annotation.Generated found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.PostConstruct found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.PreDestroy found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.Resource found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.Resource$AuthenticationType found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.Resources found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.security.DeclareRoles found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.security.DenyAll found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.security.PermitAll found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.security.RolesAllowed found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
Duplicate class javax.annotation.security.RunAs found in modules jetified-javax.annotation-api-1.3.2.jar (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0.jar (javax.annotation:jsr250-api:1.0)
//Libraries
// implementation platform('com.google.cloud:libraries-bom:20.8.0')
// compile ('com.google.cloud:google-cloud-speech')

Related

getting "Duplicate class" error after adding Meta Audience Network - Android

whenever I try to build my app after adding meta dependency I get this error message:
Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-25.2.0-runtime (com.android.support:support-compat:25.2.0)
Go to the documentation to learn how to Fix dependency resolution errors.
You can add below 2 lines into your gradle.properties file:
android.useAndroidX=true
android.enableJetifier=true

Flutter Execution failed for task ':app:checkDebugDuplicateClasses'

I was running my flutter and changed some dependencies and gradle. However, I get such error like this.
Below is my build.gradle and errors
I have seen many posts but I do not see any related posts on this error.
I have published my app into IOS but I am trying to convert my flutter app to ANDROID.
It worked to build at first.
However, It wont build now.
buildscript {
ext.kotlin_version = '1.4.32'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Below is error
'''
Launching lib/main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.google.android.gms.internal.measurement.zzbj found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbk found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbl found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbm found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbn found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbo found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbp found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbq found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbr found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzbs found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzi found in modules jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzis found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzit found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zziu found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zziv found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zziw found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzix found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zziy found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zziz found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzj found in modules jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2) and jetified-play-services-measurement-sdk-api-18.0.3-runtime (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzja found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjb found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjc found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjd found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzje found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjf found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjg found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjh found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzji found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjj found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjk found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjl found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjm found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjn found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjo found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjp found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjq found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjr found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjs found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjt found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzju found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjv found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjw found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjx found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjy found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzjz found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzka found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkb found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkc found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkd found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzke found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkf found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkg found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkh found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzki found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkj found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkk found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkl found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.internal.measurement.zzkm found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzfh found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzgl found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzgm found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzgn found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzgo found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzgp found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzgq found in modules jetified-play-services-measurement-17.2.2-runtime (com.google.android.gms:play-services-measurement:17.2.2) and jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzhs found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Duplicate class com.google.android.gms.measurement.internal.zzhx found in modules jetified-play-services-measurement-base-18.0.3-runtime (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-17.2.2-runtime (com.google.android.gms:play-services-measurement-impl:17.2.2)
Go to the documentation to learn how to Fix dependency resolution errors.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
Exception: Gradle task assembleDebug failed with exit code 1
'''
Make your project/build.gradle file structure like this :
buildscript {
ext.kotlin_version = "1.4.32"
ext.hilt_version = '2.40'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath 'com.google.gms:google-services:4.3.10'
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

google ml kit duplicate dependency

after adding com.google.mlkit:face-detection:16.0.7 I have below log error
what should I do?
Duplicate class com.google.firebase.components.Component found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.Component$1 found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.Component$Builder found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.ComponentContainer found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.ComponentFactory found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.ComponentRegistrar found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.Dependency found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.DependencyCycleException found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.DependencyException found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.components.MissingDependencyException found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.events.Event found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.events.EventHandler found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.events.Publisher found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.events.Subscriber found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Duplicate class com.google.firebase.inject.Provider found in modules jetified-firebase-common-16.0.3-runtime (com.google.firebase:firebase-common:16.0.3) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)
Go to the documentation to learn how to Fix dependency resolution errors.
you may have an existing firebase dependency that pulls in com.google.firebase:firebase-common:16.0.3 which is not compatible with the mlkit APIs. You can resolve this by using the latest firebase BOM which specifies the latest versions for all firebase SDKs:
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:28.0.1')
// OR, just explicitly pull in the latest firebase-common dependency in your project:
implementation 'com.google.firebase.firebase-common-20.0.0'

Duplicate class org.webrtc.AndroidVideoDecoder while using Jitsi Sdk and quickblox-android-sdk

I am using
com.quickblox:quickblox-android-sdk-videochat-webrtc:3.9.1 for Chat
and
org.jitsi.react:jitsi-meet-sdk:2.10.0 //for Meeting
but unable to resolve these issues
Duplicate class org.webrtc.AndroidVideoDecoder found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.AndroidVideoDecoder$1 found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.AndroidVideoDecoder$DecodedTextureMetadata
found in modules jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.AndroidVideoDecoder$FrameInfo found in
modules jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.AudioProcessingFactory found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.AudioSource found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.AudioTrack found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.BaseBitrateAdjuster found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.BitrateAdjuster found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.CallSessionFileRotatingLogSink found in
modules jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.CalledByNative found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.CalledByNativeUnchecked found in modules
jetified-google-webrtc-1.0.25003-runtime
(org.webrtc:google-webrtc:1.0.25003) and
jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime
(com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907)
Duplicate class org.webrtc.Camera1Capturer found in modules
jetified-google-webrtc-1.0.25003-runtime
Probably a late answer but for future reference, both of the dependencies are using WebRtc as a transitive dependency and thus duplicate classes
implementation ('org.jitsi.react:jitsi-meet-sdk:2.10.0') {
transitive = true
exclude group: 'com.facebook.react', module: 'react-native-webrtc'
}

Duplicate classes when building app with firebase-firestore and google-cloud-language - android

I'm getting duplicate class errors when I try to build android app that use firebase-firestore and google-cloud-language.
Duplicate class com.google.api.Advice found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
Duplicate class com.google.api.Advice$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
Duplicate class com.google.api.Advice$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
Duplicate class com.google.api.AdviceOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
...
Duplicate class com.google.type.TimeOfDayProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and proto-google-common-protos-1.15.0.jar (com.google.api.grpc:proto-google-common-protos:1.15.0)
My build.gradle looks like follow:
...
dependencies {
...
implementation 'com.google.firebase:firebase-ml-vision:20.0.0'
implementation 'com.google.firebase:firebase-firestore:19.0.0'
implementation 'io.grpc:grpc-okhttp:1.19.0'
implementation'com.google.cloud:google-cloud-language:1.76.0'
}
How can I solve the issuse ?

Categories

Resources