Problems building Connection example

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

Posts: 2
Joined: 27 Jun 2012, 19:17

Problems building Connection example

Postby lhartzman » 27 Jun 2012, 19:24

I downloaded the Android SDK and the Android Eclipse Plugin. I'm getting an error on the 'dispatch' method (and others) saying that method must override a superclass method. The same thing is happening with onCancel, onClick, and others.

I know this is a configuration problem, but I'm not sure what I've got to add and from what library.

All help appreciated.


User avatar
Site Admin
Posts: 21455
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problems building Connection example

Postby Lapo » 28 Jun 2012, 17:44

I have already replied to the other post which seems very similar to this one.
Please follow the instructions here: ... /connector

If you face problems please tell us which errors do you see. Thanks
All the examples should work out of the box if you follow the example tutorials.
...addicted to flash games
Posts: 3
Joined: 16 Jul 2012, 04:38

Re: Problems building Connection example

Postby jander » 16 Jul 2012, 04:47


I'm facing the same problem. As far as I can tell, I followed all instructions in the docs2x pages.

The problem seems to be that when Runnable is instatiated (in the dispatch method), the run method must be implemented and not overrided.

I'm missing something?

Eclipse SDK 4.2.0
Android SDK revision 20
Emulated Phone with Android 2.3.3


Posts: 3
Joined: 16 Jul 2012, 04:38

Re: Problems building Connection example

Postby jander » 27 Jul 2012, 15:21


I'm not sure why, but the following procedure solved the problem for me.

1. Locate all @Overrides with errors and remove them. This wil remove all compile time issues, but the program will not work yet.

2. Change the name of the lib folder to libs. Eclipse will complain now about the missing libraries.

3. Fix the build library path (right click project name, and choose Properties > Java Build Path, and open Libraries). Select all JARs, except Android 2.3.3 (for me) and Android Dependencies, and remove them. Click on Add JARs..., browse to the recently renamed libs folder and select all JARs in it. Click OK.

4. Run your application and be happy.

It worked like a charm for Connector, Simple Chat, and Tris.

Hope this helps.


Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 4 guests