Getting Duplicate class error while adding In-app update dependency in android studio

I am facing issue on implementing implementation 'com.google.android.play:app-update:2.1.0' & implementation 'com.google.android.play:app-update-ktx:2.1.0' on my project but am getting error stating duplicate class found. Below attached is my error log.

Duplicate class com.google.android.play.core.appupdate.AppUpdateManager found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.AppUpdateManagerFactory found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.AppUpdateOptions found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.AppUpdateOptions$Builder found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.testing.FakeAppUpdateManager found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zza found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzaa found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzb found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzc found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzd found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zze found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzf found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzg found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzh found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzi found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzj found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzk found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzl found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzm found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzn found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzo found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzp found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzq found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzr found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzs found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzt found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzu found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzv found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzw found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzx found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzy found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.appupdate.zzz found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.3-runtime (com.google.android.play:core-common:2.0.3)
Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.3-runtime (com.google.android.play:core-common:2.0.3)
Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.3-runtime (com.google.android.play:core-common:2.0.3)
Duplicate class com.google.android.play.core.install.InstallException found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.InstallState found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.InstallStateUpdatedListener found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.NativeInstallStateUpdateListener found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.model.ActivityResult found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.model.AppUpdateType found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.model.InstallErrorCode found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.model.InstallStatus found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.model.UpdateAvailability found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.model.zza found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.install.zza found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3)
Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.3-runtime (com.google.android.play:core-common:2.0.3)
 
Go to the documentation to learn how to Fix dependency resolution errors.

My App gradle looks like this

apply plugin: 'com.android.application'
apply plugin: 'adeum'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

android {
    compileSdkVersion 33

    defaultConfig {
        applicationId "com.Test.Application"
        minSdkVersion 26
        targetSdkVersion 33
        versionCode 1464
        versionName "11.86.45"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        resConfigs "en"
        resValue "string", "app_name", "Test App"
    }


    signingConfigs {
        release {
            keyAlias 'abc'
            keyPassword 'abc@123'
            storeFile file('keystore.jks')
            storePassword 'abc@123'
            enableV1Signing = true
            enableV2Signing = true
            enableV3Signing = true
            enableV4Signing = true
        }
        debug {
            keyAlias 'abc'
            keyPassword 'abc@123'
            storeFile file('keystore.jks')
            storePassword 'abc@123'
            enableV1Signing = true
            enableV2Signing = true
            enableV3Signing = true
            enableV4Signing = true
        }
    }

    buildTypes {
        debug {

            debuggable true
            jniDebuggable true
            signingConfig signingConfigs.fingo_debug
            minifyEnabled false
            shrinkResources false
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            applicationIdSuffix = ".debug"
        }
        release {
            ndk {
                abiFilters "arm64-v8a", "armeabi-v7a"
            }

            debuggable false
            jniDebuggable false
            signingConfig signingConfigs.fingo_release
            minifyEnabled true
            shrinkResources true
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    flavorDimensions "mode"
    productFlavors {
        //Some data here
    }


    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }

    dataBinding {
        enabled = true
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
    implementation 'androidx.core:core-ktx:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
    implementation 'androidx.navigation:navigation-fragment:2.3.0'
    implementation 'androidx.navigation:navigation-ui:2.3.0'
    implementation 'androidx.work:work-runtime:2.7.1'
    implementation 'androidx.ads:ads-identifier:1.0.0-alpha03'
    implementation 'androidx.browser:browser:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    //Retrofit Dependencies
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.8.0'

    //Kotlin Coroutines
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1"

    // ViewModel and LiveData
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"

    implementation 'com.google.android.material:material:1.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'

    //viewpagerdotsindicator - carousel
    implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:3.0.3'

    //noinspection GradleCompatible
    implementation 'com.scottyab:aescrypt:0.0.1'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation "androidx.biometric:biometric:1.2.0-alpha03"
    //implementation 'com.github.aabhasr1:OtpView:v1.1.2-ktx'

    //Firebase
    implementation platform('com.google.firebase:firebase-bom:26.6.0')
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.google.firebase:firebase-config-ktx'
    implementation 'com.google.firebase:firebase-crashlytics-ktx'
    implementation 'com.google.firebase:firebase-messaging-ktx'

    implementation 'com.google.android.gms:play-services-location:17.0.0'

    //notifyvisitors
    implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:5.3.8.2'
    implementation 'com.android.installreferrer:installreferrer:2.1'

    //Navigation graph
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'

    //bottomNavigationView
//    implementation 'com.github.ibrahimsn98:SmoothBottomBar:1.7.6'

    //Navigation graph
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'

    //Picasso
    implementation 'com.squareup.picasso:picasso:2.71828'

    //viewpager2
    implementation "androidx.viewpager2:viewpager2:1.0.0"

    //Razorpay
    implementation 'com.razorpay:checkout:1.6.26'
    implementation "com.razorpay:razorpay-java:1.4.3"

    //Billdesk
    implementation project(path: ':BillDeskSDK_v2.1.3')

    //seekbar
    implementation 'com.github.warkiz.widget:indicatorseekbar:2.1.2'

    //jetpack security
    implementation "androidx.security:security-crypto:1.1.0-alpha01"

    // Kotlin + coroutines
    implementation "androidx.work:work-runtime-ktx:2.7.1"

    //rating bar
    implementation 'com.github.wangda11:AndRatingBar:1.0.5'

    //ktx
    implementation "androidx.fragment:fragment-ktx:1.3.6"

    //Facebook
//    implementation 'com.facebook.android:facebook-android-sdk:12.0.1'
//    implementation 'com.facebook.android:facebook-marketing:[4,5)'

//    //Play Integrity
    implementation 'com.google.android.play:integrity:1.2.0'
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.1"


    implementation 'com.scottyab:rootbeer-lib:0.1.0'

    // This dependency is downloaded from the Google’s Maven repository.
    // So, make sure you also include that repository in your project's build.gradle file.
    implementation 'com.google.android.play:app-update:2.1.0'

    // For Kotlin users also add the Kotlin extensions library for Play In-App Update:
    implementation 'com.google.android.play:app-update-ktx:2.1.0'
}

and my project gradle look like this

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.6.21'
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url "https://dl.bintray.com/" }
    }
    dependencies {
        classpath 'com.android.tools:r8:3.3.28'  //Must be before the Gradle Plugin for Android. - Or any other version
        classpath 'com.android.tools.build:gradle:7.2.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.10'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
        classpath 'com.appdynamics:appdynamics-gradle-plugin:22.2.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
        maven { url "https://dl.bintray.com/notifyvisitors/notifyvisitors" }
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Can anyone help me resolve this issue?

I tried some method to hide some dependency packages being called. But am still getting this error. Whenever i sync the project the build is getting built. Get generating apk/aab it is throwing this error.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật