Duplicate class found error

error appened when I build pdf project use github implementation
errors below:

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.3.1-runtime (com.android.support:support-compat:25.3.1)
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.3.1-runtime (com.android.support:support-compat:25.3.1)

settings.gradle.kts below:

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()//new added
        maven { url=uri("https://jitpack.io") }//new added
        maven { url=uri("https://repository.liferay.com/nexus/content/repositories/public/") }//new added
    }
}

rootProject.name = "DBT2"
include(":app")

below module(app) build.gradle.kts:

plugins {
    id("com.android.application")
}

android {
    namespace = "aa.app.dbt2"
    compileSdk = 34

    defaultConfig {
        applicationId = "aa.app.dbt2"
        minSdk = 24
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation ("com.github.barteksc:android-pdf-viewer:2.8.2")//new added

    implementation("androidx.appcompat:appcompat:1.6.1")
    implementation("com.google.android.material:material:1.9.0")
    implementation("androidx.constraintlayout:constraintlayout:2.1.4")
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}

attention: implementation(“androidx.appcompat:appcompat:1.6.1”) ;Dependencies using groupId com.android.support and androidx.* can not be combined but found com.android.support:support-v4:25.3.1 and androidx.appcompat:appcompat:1.6.1 incompatible dependencies

Your error sounds pretty clear.
You depend on com.github.barteksc:android-pdf-viewer:2.8.2
which depends on com.github.barteksc:pdfium-android:1.7.1
which depends on com.android.support:support-v4:25.3.1.
And you have dependencies on androidx... dependencies.
And your error says you cannot combine these.
Looking at the repository of that pdf viewer dependency shows that it was not touched in many years, so I guess that project might be unmaintained and just not compatible with recent ecosystem.

Thanks,several days I read your reply but not understand,today I tried again and ask for gpt,it tells me
solution methods and finally app run very well by adding below two lines:

android.useAndroidX=true//default
android.enableJetifier=true//I added