nkzawa / socket.io-android-chat

A simple chat demo for socket.io and Android
MIT License
2k stars 692 forks source link

Not find class okhttp3.OkHttpClient$Builder #34

Open indiefr opened 8 years ago

indiefr commented 8 years ago

Hi i tried add the .jar's, i tried add older libreries and only in one of my disp for bug this error out.

E/dalvikvm: Could not find class 'okhttp3.OkHttpClient$Builder', referenced from method io.socket.engineio.client.transports.WebSocket.doOpen 05-17 17:37:06.707 30194-31321/mx.com.avanceytec.ventascampo E/AndroidRuntime: FATAL EXCEPTION: EventThread Process: mx.com.avanceytec.ventascampo, PID: 30194 java.lang.NoClassDefFoundError: okhttp3.OkHttpClient$Builder

this are my dependencies: _dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile('org.apache.httpcomponents:httpclient-android:4.3.5.1') { exclude module: 'com.squareup.okio' } compile('io.socket:socket.io-client:0.7.0') { // excluding org.json which is provided by Android exclude group: 'org.json', module: 'json' } compile 'com.android.support:appcompat-v7:23.2.0' compile 'com.android.support:design:23.2.0' compile 'com.android.support:support-v4:23.2.0' compile 'com.loopj.android:android-async-http:1.4.7' compile 'com.google.android.gms:play-services-location:8.4.0' compile 'com.android.support:cardview-v7:23.2.0' compile 'com.android.support:recyclerview-v7:23.2.0' compile 'com.google.android.gms:play-services:8.4.0' //compile 'com.github.gcacace:signature-pad:1.1.0'

}_ Help me please. Thanks

nkzawa commented 8 years ago

socket.io-client-java internally uses okhttp. I guess another version of okhttp is used on your dependencies modules ?