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.

java.lang.NoClassDefFoundError in API Level 23 (Android 6)

See original GitHub issue

I’m using Kohttp with AndroidAnnotations. For debug builds, I’m using MultiDex and for release builds, I’m disabling MultiDex and enabling ProGuard and Shrinking.

Everything is working fine on Android 8 and 9 devices. However, for Android 4.4 and 6 devices, I’m getting the following error when doing a post request:

java.lang.NoClassDefFoundError: io.github.rybalkinsd.kohttp.dsl.context.HeaderContext$sam$java_util_function_BiConsumer$0
        at io.github.rybalkinsd.kohttp.dsl.context.HeaderContext.forEach$kohttp(HeaderContext.kt:20)
        at io.github.rybalkinsd.kohttp.dsl.context.HttpContext.makeHeaders(HttpContext.kt:50)
        at io.github.rybalkinsd.kohttp.dsl.context.HttpContext.makeRequest(HttpContext.kt:38)
        at io.github.rybalkinsd.kohttp.dsl.HttpPostDslKt.httpPost(HttpPostDsl.kt:48)
        at com.eximusedu.app.service.Service.login(Service.kt:62)
        at com.eximusedu.app.LoginActivity.doLogin(LoginActivity.kt:137)
        at com.eximusedu.app.LoginActivity_.access$101(LoginActivity_.java:35)
        at com.eximusedu.app.LoginActivity_$5.execute(LoginActivity_.java:162)
        at org.androidannotations.api.BackgroundExecutor$Task.run(BackgroundExecutor.java:400)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:833)

What could possibly the issue here? Thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
sharafatcommented, Sep 30, 2019

@rybalkinsd sure, thanks. I’ve added you to our private Bitbucket repository.

0reactions
rybalkinsdcommented, Oct 26, 2019

fix will be available in 0.11.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting java.lang.NoClassDefFoundError after updating to API ...
I am building an android app and when I was halfway through I updated my SDK version using SDK manager, I also updated...
Read more >
NoClassDefFoundError - Android Developers
On this page; Summary. Public constructors; Inherited methods. Public constructors. NoClassDefFoundError; NoClassDefFoundError. Android Developers.
Read more >
java.lang.NoClassDefFoundError: j$.$r8$wrapper$java$util ...
App crashes on Android API 23 and below: java.lang.NoClassDefFoundError: j$.$r8$wrapper$java$util$function$Supplier$-WRP.
Read more >
java.lang.NoClassDefFoundError on Android 5 & 6 #1922
Step 1: Describe your environment. Android device: OnePlus X; Android OS version: 6.0.1; Google Play Services version: 20.30.19 ...
Read more >
Firebase Android SDK Release Notes
App Distribution Gradle plugin version 2.1.2. Fixed an error ( java.lang.NoClassDefFoundError: com/google/api/client/json/jackson2/JacksonFactory ) that ...
Read more >

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