Page 1 of 1

Basic Connection Example not working for android

Posted: 18 May 2011, 09:54
by ashwanik
I am new to android environment but have experience of Java. I am trying to make a multiplayer game for android environment. But when I try to run Basic Connection example in android emulator it says that app has crashed. On checking the log files for the same I found that it gives java null pointer exception for sfs.connect("10.0.2.2"). Please help me to solve this problem.

Re: Basic Connection Example not working for android

Posted: 18 May 2011, 11:52
by janux
ashwanik wrote:I am new to android environment but have experience of Java. I am trying to make a multiplayer game for android environment. But when I try to run Basic Connection example in android emulator it says that app has crashed. On checking the log files for the same I found that it gives java null pointer exception for sfs.connect("10.0.2.2"). Please help me to solve this problem.
Check that your server runs on IP 10.0.2.2.

Posted: 19 May 2011, 03:49
by ashwanik
Server should run on 127.0.0.1 or 10.0.2.2? Isn't it that 10.0.2.2 is loop back interface for android emulator so I must run my server on my local host only? I have tried both but still getting the same response and app crashes.

Please help what should I do? I have installed SFS2X and downloaded Java API. I have not changed anything in that but still it does not run.