-
Notifications
You must be signed in to change notification settings - Fork 973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in Android applications #5
Comments
I'm not sure, but it can be the following: Or please let met know the details (logs, the version of android you use, how you installed the library). |
I am getting the same error.
code i am using is
log says 06-11 16:09:23.912: W/dalvikvm(16631): VFY: unable to find class referenced in signature (Lorg/java_websocket/client/WebSocketClient;) |
Mi issue happen like VaibhavAjayGupta but with java 7 and android sdk 19. |
@VaibhavAjayGupta Did you install |
I've also installed the engine.io-client.jar dependency but don't run because "'Lcom/github/nkzawa/engineio/client/transports/WebSocket$1;' not found. Is strange because my source runs OK in a stand-alone java application. |
After downloading all the dependency jars i am not getting the above errors but now i am getting this error Could not find method org.json.JSONArray.remove, referenced from method com.github.nkzawa.socketio.client.Socket$4.run |
@nkzawa thanks for the library. Awesome library 👍 @juanmiguelRuaDev
|
I will fix |
sure |
Thank you very much @nkzawa and @VaibhavAjayGupta!. When I've time, I'll upgrade my current socket.io version in other branch. |
@nkzawa This issue also affects on me. Thank you! Waiting for a fix. |
@VaibhavAjayGupta suggestion of adding the lib got mine fixed. Thank you! And thank you @nkzawa |
This is the copy of my logcat: 07-06 16:13:55.767: E/AndroidRuntime(9040): FATAL EXCEPTION: Thread-900 This is the code for the android application:
} and this is the code at server side: //set up the server //start server 130.237.238.191 //bind the socket to the server //var fs = require('fs'); //var io = require('socket.io').listen(8001); io.sockets.on('connection', function (socket) { /*socket.on('request', function (data) {
});*/ I tried both the solution with and without AsyncTask and they gave me both the same errors. |
@dragochristian Your error is pretty explicit: "Only the original thread that created a view hierarchy can touch its views." The line: "logTV.setText("CONNECTED");" Cannot be called from a doInBackground thread. You should probably use the Handler class for that. Read the Android docs on AsyncTask to learn why. EDIT: btw, this is not related to socket.io. If unsure: StackOverflow. |
I forgot to remove it after I copy and paste in the async task! |
fixed #10 |
Just thought I'd mention that I'm clueless about why this issue ("Could not find method org.java_websocket.client.WebSocketClient., referenced from method com.github.nkzawa.engineio.client.transports.WebSocket$1.") happens. I'm trying to solve it in a different way though so I can successfully debug the whole project (including socket.io-client, engine.io-client and Java-WebSocket library code) in Eclipse. I have imported the projects into the IDE and followed http://stackoverflow.com/questions/14765910/could-not-find-class-xxx-referenced-from-method-xxx-yyy for each of them (i.e. added the generated target jar file to the project's Build Path, selected the file in the Order and Export tab and moved it to the top of the list). It works for the first two projects but for Java-WebSocket it doesn't work. It only worked after I downloaded and included http://search.maven.org/remotecontent?filepath=org/java-websocket/Java-WebSocket/1.3.0/Java-WebSocket-1.3.0.jar in the libs folder as @VaibhavAjayGupta mentioned. If anyone has an idea about what is going on, please let us know. |
Can you tell me steps to do WebSocket connection .... |
compile ('io.socket:engine.io-client:1.0.0') { its work for me |
When I try to open connection to http socket.io server. An exception is thrown by Dalvik :
"Could not find class 'com.gitgub.nkzawa.engineio.client.transports.WebSocket$1" referenced from method com.github.nkzawa.engineio.client.transport.WebSocket.doOpen
From java application run correctly.
The text was updated successfully, but these errors were encountered: