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

Android_tutorial_pubsub errors on Eclipse

asked 2012-09-20 19:38:42 -0600

steven7 gravatar image

updated 2014-01-28 17:13:42 -0600

ngrennan gravatar image

I have been trying to set up an environment for developing an ROS Android application for some time but have no luck so far. I followed the tutorial Installing/building rosjava_core & android_core and got kinda stuck on the last step.

After successfully execute ./gradlew debug I tried to create a new Android Project from existing code by browsing to the "android_tutorial_teleop". Then I add all of the jars in the libs directory to the project build path by "Configuring Build Path". But there are still lots of error at my where the import failed (cannot be resolved) with the "red lines" below them. Any ideas where I did wrong and how to solve them.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-10-10 06:14:50 -0600

damonkohler gravatar image

Make sure you have the latest ADT and Android SDK installed. There have been a lot of changes in the way that dependencies are handled.

Also, I've seen Eclipse builds of Android projects get stuck in a bad state many times. Not ideal. My personal recipe:

  1. Disable automatic building
  2. Do a clean build
  3. Refresh and build projects starting from the bottom of the dependency tree
  4. Repeat until successful

Unfortunately, this problem is not part of rosjava or the rosjava build process. I have no ability to actually make it easier :(

edit flag offensive delete link more

answered 2012-10-25 07:14:21 -0600

jochen.mueck gravatar image

I found it most convenient to not add all the jars from the libs directory to the build path. Instead import all rosjava and android_core projects into the eclipse workspace and add those to the build path of the project. This might help too, plus you always get fresh versions of the dependencies. But as Damon mentioned it still is a lot of trial and error.

edit flag offensive delete link more

Question Tools


Asked: 2012-09-20 19:38:42 -0600

Seen: 375 times

Last updated: Oct 25 '12