Skip to content

java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/ConnectionListener #3089

Open
@dawidhyzy

Description

@dawidhyzy

Before opening, please confirm:

Language and Async Model

Kotlin - Coroutines

Amplify Categories

Authentication

Gradle script dependencies

// Put output below this line
amplify = "2.29.1"

amplifyframework-core = { module = "com.amplifyframework:core-kotlin", version.ref = "amplify" }
amplifyframework-aws-auth-cognito = { module = "com.amplifyframework:aws-auth-cognito", version.ref = "amplify" }

okhttp-bom = "com.squareup.okhttp3:okhttp-bom:5.0.0"
okhttp = { module = "com.squareup.okhttp3:okhttp" }

Environment information

# Put output below this line
------------------------------------------------------------
Gradle 8.14.3
------------------------------------------------------------

Build time:    2025-07-04 13:15:44 UTC
Revision:      e5ee1df3d88b8ca3a8074787a94f373e3090e1db

Kotlin:        2.0.21
Groovy:        3.0.24
Ant:           Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM:  21.0.6 (JetBrains s.r.o. 21.0.6+9-b895.109)
Daemon JVM:    /Users/xyz/Library/Java/JavaVirtualMachines/jbr-21.0.6-2/Contents/Home (no JDK specified, using current Java home)
OS:            Mac OS X 15.5 aarch64

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

After upgrading OkHttp to the latest stable version, Amplify started crashing with java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/ConnectionListener

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


Configuration File

No response

GraphQL Schema

// Put your schema below this line

Additional information and screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions