socket.io-android-chat icon indicating copy to clipboard operation
socket.io-android-chat copied to clipboard

This has a conflict with okhttp dispatcher (retrofit)

Open whowazit opened this issue 8 years ago • 2 comments

I tried to connect using this library and I'm also using okhttp for some api request but it has a conflict with okhttp dispatcher.

03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: java.lang.NoSuchMethodError: com.squareup.okhttp.internal.Internal.callEngineGetConnection 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:154) 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:42) 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: at com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:102) 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177) 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 03-10 13:39:12.721 5216-5275/com.shima.thebizgames E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856)

whowazit avatar Mar 10 '16 05:03 whowazit

I have the same problem too and can't seem to find a fix yet. I'm also using Retrofit and Socket.io

TheWeakestLink avatar Apr 05 '16 03:04 TheWeakestLink

In my case don't really need to include okhttp in build.gradle file can still use it and make it work with Retrofit. After remove okhttp in app/build.gradle file everything seems okay.

bingdow avatar Aug 05 '16 02:08 bingdow