重复 Class com.github.msarhan

Duplicate Class com.github.msarhan

将 ummalqura 日历依赖项更新到 2.0.2 时出现重复错误。这里我提供堆栈错误。

Duplicate class com.github.msarhan.ummalqura.calendar.UmmalquraCalendar found in modules jetified-ummalqura-calendar-2.0.2 (com.github.msarhan:ummalqura-calendar:2.0.2) and jetified-ummalqura-calendar-snapshots-1.1.13 (net.alhazmy13:ummalqura-calendar-snapshots:1.1.13)
Duplicate class com.github.msarhan.ummalqura.calendar.UmmalquraDateFormatSymbols found in modules jetified-ummalqura-calendar-2.0.2 (com.github.msarhan:ummalqura-calendar:2.0.2) and jetified-ummalqura-calendar-snapshots-1.1.13 (net.alhazmy13:ummalqura-calendar-snapshots:1.1.13)
Duplicate class com.github.msarhan.ummalqura.calendar.UmmalquraGregorianConverter found in modules jetified-ummalqura-calendar-2.0.2 (com.github.msarhan:ummalqura-calendar:2.0.2) and jetified-ummalqura-calendar-snapshots-1.1.13 (net.alhazmy13:ummalqura-calendar-snapshots:1.1.13)
Duplicate class com.github.msarhan.ummalqura.calendar.text.UmmalquraFormatData_ar found in modules jetified-ummalqura-calendar-2.0.2 (com.github.msarhan:ummalqura-calendar:2.0.2) and jetified-ummalqura-calendar-snapshots-1.1.13 (net.alhazmy13:ummalqura-calendar-snapshots:1.1.13)
Duplicate class com.github.msarhan.ummalqura.calendar.text.UmmalquraFormatData_en found in modules jetified-ummalqura-calendar-2.0.2 (com.github.msarhan:ummalqura-calendar:2.0.2) and jetified-ummalqura-calendar-snapshots-1.1.13 (net.alhazmy13:ummalqura-calendar-snapshots:1.1.13)

这是我的 build.gradle

plugins {
    id 'com.android.application'
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.example.munajat"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    sourceSets {
        main {
            res {
                srcDirs 'src\main\res', 'src\main\res\layouts\duas', 'src\main\res\duas', 'src\main\res\layouts\ziarah', 'src\main\res\layouts\amal', 'src\main\res\layouts\munajat', 'src\main\res\layouts\amalramadan', 'src\main\res\layouts\taqibsolat', 'src\main\res\layouts\amalsyaaban', 'src\main\res\layouts\amalrejab'
            }
        }
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    testImplementation 'junit:junit:4.+'
    implementation 'com.airbnb.android:lottie:3.6.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'net.alhazmy13.hijridatepicker:library:3.0.2'
    implementation 'com.github.msarhan:ummalqura-calendar:2.0.2'
    implementation 'com.intuit.sdp:sdp-android:1.0.6'
    implementation 'com.intuit.ssp:ssp-android:1.0.6'

}

问题可能是我直接更新了依赖,而它仍然使用旧的库。 请帮助我卡住了。

是的,hijridatepicker 问题.. 您可以通过添加他正在使用的相同版本来解决此问题。

替换:

implementation 'com.github.msarhan:ummalqura-calendar:2.0.2'

与:

implementation group: 'net.alhazmy13', name: 'ummalqura-calendar-snapshots', version: '1.1.13'