NaikSoftware / StompProtocolAndroid

STOMP protocol via WebSocket for Android
MIT License
597 stars 265 forks source link

Could not find method org.java_websocket.client.WebSocketClient.setSocket #56

Open adek445 opened 7 years ago

adek445 commented 7 years ago

Hello, yesterday I've made android client to connect with ws but today something happend and got this error: I/dalvikvm: Could not find method org.java_websocket.client.WebSocketClient.setSocket, referenced from method ua.naiksoftware.stomp.WebSocketsConnectionProvider.createWebSocketConnection

You know what could that be? What is interesting messages are still sending to ws, but doesn't receive anything.

forresthopkinsa commented 7 years ago

Are you using JWS or OkHttp as your connection provider? Are you including one or both of them in your Gradle dependencies?

adek445 commented 7 years ago

I'm including both of them. So i should use one of them? But if I use one of them I've got something like that: Could not find class 'okhttp3.OkHttpClient', referenced from method ua.naiksoftware.stomp.Stomp.getOkHttpClient or Could not find class 'org.java_websocekt.WebSocket', referenced from method ua.naiksoftware.stomp.Stomp.over

But, it's like warning and everything else working.

I've made new project and do eveything again and it's working. Sorry for trouble. Have a nice day.

forresthopkinsa commented 7 years ago

Yeah, I was going to suggest that you use both. Glad it's working.

testGumar commented 5 years ago

Use this library its working fine, replace server url and port with your custom server url and your port. https://github.com/SayyedUmar/Stomp-Android-Client