Basic Connection Example not working for android
Basic Connection Example not working for android
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
Check that your server runs on IP 10.0.2.2.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.
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.
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.