【问题标题】:Duplicate Class com.github.msarhan重复类 com.github.msarhan
【发布时间】:2021-08-18 18:30:30
【问题描述】:

当我将 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'

}

当我直接更新依赖项时,可能会出现问题,而它仍然使用旧库。 请帮助我卡住了。

【问题讨论】:

    标签: android-studio calendar dependencies


    【解决方案1】:

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

    替换:

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

    与:

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

    【讨论】:

      猜你喜欢
      • 2017-03-28
      • 2020-04-17
      • 1970-01-01
      • 2011-07-18
      • 2020-10-09
      • 2013-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多