question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoClassDefFoundError: kotlinx.coroutines.android.HandlerContextKt

See original GitHub issue

After update kotlin version to 1.3.0.I add follow to gradle:

    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.0'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0'
    implementation "org.jetbrains.anko:anko:$anko_version"

but in runtime,throw exception:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.konka.remoteservice, PID: 30643
    java.lang.NoClassDefFoundError: kotlinx.coroutines.android.HandlerContextKt
        at org.jetbrains.anko.sdk27.coroutines.Sdk27CoroutinesListenersWithCoroutinesKt.onClick$default(ListenersWithCoroutines.kt:293)
        at com.konka.remoteservice.activity.MainActivity.onCreate(MainActivity.kt:33)
        at android.app.Activity.performCreate(Activity.java:5288)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
        at android.app.ActivityThread.access$800(ActivityThread.java:135)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5001)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
        at dalvik.system.NativeStart.main(Native Method)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
SergiJuanolacommented, Nov 20, 2018

I just tested it out. The new Anko 1.0.8 works with Kotlin 1.3 and coroutines 1.0.0

1reaction
simi-alukocommented, Sep 4, 2019

project works now with kotlin version 1.3.50 and with anko version 0.10.8

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found