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

Revision history [back]

The problem is that the gradle version you're using (probably the one from the Ubuntu repos, installed via apt-get) is too old for rosjava. You can find out which version you're using by running

gradle -v
  • throws the error you mentioned (Oneiric version): Gradle 1.0-milestone-3
  • works (rosjava version): Gradle 1.0-milestone-9

You have two options. Either you manually install the newest gradle from the web site, or you use the gradle version bundled with rosjava like this:

mkdir ~/bin
ln -s ros/stacks/rosjava_core/gradlew ~/bin/gradle    # or wherever you installed rosjava_core
echo 'export PATH=~/bin:$PATH' >> .bashrc
source .bashrc

The first problem is that the gradle version you're using (probably the one from the Ubuntu repos, installed via apt-get) is too old for rosjava. You can find out which version you're using by running

gradle -v
  • throws the error you mentioned (Oneiric version): Gradle 1.0-milestone-3
  • works (rosjava version): Gradle 1.0-milestone-9

You have two options. Either you manually install the newest gradle from the web site, or you use the gradle version bundled with rosjava like this:

mkdir ~/bin
ln -s ros/stacks/rosjava_core/gradlew ~/bin/gradle    # or wherever you installed rosjava_core
echo 'export PATH=~/bin:$PATH' >> .bashrc
source .bashrc

As for your second problem, don't copy the build.gradle file from rosjava_tutorial_pubsub, because it won't work outside the rosjava_core directory (it's meant to be built as a subproject of rosjava). Instead, use the build.gradle file from the rosjava "Getting Started" page you linked to.