ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

rosjava.android overrides interface functions

asked 2012-04-17 07:54:01 -0600

Jyo gravatar image

I have successfully installed and built both rosjava and rosjava.android.

I add android_gingerbread, android_honeycomb_mr2 and android_tutorial_teleop to an eclipse project.

android_gingerbread throws 40 errors complaining that the Method X must override a superclass method. Upon inspection each of these methods has an @Override for an interface. It is my understanding that you do not @Override interface classes, so I am confused why it is overriding to begin with. I tried going through and changing each interface into class, fixing the function, and making android_gingerbread extend them instead of implement, but some of the classes are android libraries I cannot change. android_honeycomb_mr2 also throws around 80 of the same errors.

Is the solution just to remove all of the @override's? Or is there something else going on here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-04-17 10:48:49 -0600

jatowler gravatar image

The use of the @Override annotation changed between Java 1.5 and Java 1.6 with respect to implementing interface methods. In Eclipse, check Window->Preferences->Java->Compiler->Compiler Compliance Level; set that to 1.6. You might check the project-specific settings as well, under the main Java Compiler page.

There is some more information available at Stack Overflow.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-04-17 07:54:01 -0600

Seen: 258 times

Last updated: Apr 17 '12