Skip to content

coroutine 0.25.0 gradle compile error "Program type already present: kotlinx.coroutines.experimental.scheduling.LimitingDispatcher" #520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
EasonLiu09 opened this issue Aug 28, 2018 · 6 comments

Comments

@EasonLiu09
Copy link

EasonLiu09 commented Aug 28, 2018

Hi,
I cannot compile while I use coroutine version 0.25.0 but when I change it to 0.23.4 it work !
I find no answer about this problem, is it because only happen in 0.25.0?
why this problem happens when compile coroutine 0.25.0

below is my gradle and error
kotlin_version is 1.2.61

2018-08-28 11 26 02

2018-08-28 11 27 37

2018-08-28 11 27 56

thanks for reading this problem

@Fover23
Copy link

Fover23 commented Aug 28, 2018

emmm. I hava the same problem.

My kotlin version is 1.2.61
Android Studio version is 3.1.4
Platform is Windows 10

My gradle configuration is:

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/main.kotlin_module'
    }
    compileSdkVersion 28
    defaultConfig {
        applicationId "cn.fover.xxx"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:design:28.0.0-rc01'
    implementation 'com.android.support:support-vector-drawable:28.0.0-rc01'
    implementation 'com.android.support:support-v4:28.0.0-rc01'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
    implementation "android.arch.persistence.room:runtime:1.1.1"
    implementation 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
    implementation 'joda-time:joda-time:2.10'
    implementation 'me.jessyan:autosize:0.7.0'

    implementation 'android.arch.persistence.room:runtime:1.1.1'
    annotationProcessor 'android.arch.persistence.room:compiler:1.1.1'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.25.0'
}

Build error

default

@EasonLiu09
Copy link
Author

Hi @Fover23
Have you find out any solution about this problem?

@Fover23
Copy link

Fover23 commented Aug 28, 2018

@EasonLiu09 No. I try to fix it by regular way , such as restart studio or clean project , it does not work.
So I change it to old version.

@EasonLiu09
Copy link
Author

@Fover23 yeah me too, it's kinda weird

@GeoffreyMetais
Copy link

This is a duplicate of issue #510

@EasonLiu09
Copy link
Author

ok, i will close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants