Duplicate Class com.github.msarhan

Issue

I got duplicate error when i update the ummalqura calendar dependencies to 2.0.2. Here i provide the stack error.

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)

And here is my 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'

}

The problem maybe occur when i directly updated dependencies, while the it still use the old library.
Please help im stuck.

Solution

Yeah, issue with hijridatepicker..
You can go over this issue by adding the same Version he is using.

Replace:

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

With:

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

Answered By – aelahmar

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published