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

Android_tutorial_pubsub errors on Eclipse

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

steven7 gravatar image

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

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 MainActivity.java 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
4

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

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
0

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

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

Stats

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

Seen: 403 times

Last updated: Oct 25 '12