Note: This tutorial assumes that you have completed the previous tutorials: Installation.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Building in Eclipse

Description: Configuring the Eclipse IDE for ros android package builds.

Keywords: android, eclipse

Tutorial Level: BEGINNER

Next Tutorial: Create a New App

Overview

These are alternate build instructions for android projects in eclipse. This currently is definitely worth it - builds are faster and the easy with which you can run and observe logging is wunderbar.

Note that there are difference between eclipse builds and adt builds (as used by our catkinized gradle environment). Compiling some from one and some from the other is not, at this stage, compatible.

Preparation

Eclipse Download

The android download now includes an already configured eclipse installation next to the sdk folder. Use that.

Initial Build

Make sure you do an initial build of the rosjava and android stacks as described in the Installation Tutorial. For the android stacks this is important as it dex's all the necessary java jar files for each project.

Importing Packages

Simply Import->Android->Existing android code into workspace by pointing it to the root of each of your chained workspaces (~/android/src, ~/turtlebot_android/src). It will bring in all the android projects and should automatically index everything successfully.

Be sure to grab everything, eclipse needs all projects in its workspace to reference things correctly (check this, I don't think it's smart enough to go out hunting on its own!).

LogCat View

Many of the applications use the tag 'RosAndroid'. Add this filter to the logcat view.

Linking to Other Android Libraries

If you want to link one project to another ros android library:

  • Add a <build_depend> tag for the dependency in package.xml.

  • Drop to the catkin workspace and switch to your project folder.
  • Run android_generate_project_properties.

Wiki: turtlebot_android/Tutorials/hydro/Building in Eclipse (last edited 2013-05-09 07:53:20 by DanielStonier)