Skip to content Skip to sidebar Skip to footer

Duplicate Entry: Okhttp3/internal/ws/RealWebSocket$1.class

I am using LeanCloud as my push notification service provider but somehow when I run my app it gives me this error. Below is my dependencies: dependencies { compile 'com.androi

Solution 1:

you can add this in your app.gradle

configurations.all {
        // OkHttp 3.5.0+ includes the websockets API, so we need this to prevent a conflict
        exclude module: 'okhttp-ws'
}

it may help you! https://github.com/facebook/react-native/issues/12646


Solution 2:

Add the below lines it may help you, working for me.

configurations.all { resolutionStrategy.force 'com.squareup.okhttp3:okhttp:3.4.1' }

Post a Comment for "Duplicate Entry: Okhttp3/internal/ws/RealWebSocket$1.class"