ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Error building Android app with rosjava

asked 2016-02-09 13:46:14 -0500

droberts42 gravatar image

We are currently creating an Android app running on a Tango and want to publish data (pose and point cloud) to a ROS Indigo node generated on the Tango. We are also using Android Studio version 1.5.1 on Ubuntu 14.04 to develop this app.

From what we understand we will need to modify the .gradle files associated with the Android project in order so we can point to the ROSJava libraries.

We understand from the No Ros Installation tutorial ( there is a Maven repository where the relevant dependencies are stored.

This is our app-level .gradle file:

apply plugin: ''

android {
    compileSdkVersion 19
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.projecttango.experiments.nativepointcloud"
        minSdkVersion 19
        targetSdkVersion 19

    sourceSets.main {
        jniLibs.srcDir 'src/main/libs'
        jni.srcDirs = [];

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

tasks.withType(JavaCompile) {
    compileTask -> compileTask.dependsOn ndkBuild

task ndkBuild(type: Exec) {
    Properties properties = new Properties()
    def ndkbuild = properties.getProperty('ndk.dir', null)+"/ndk-build"
    commandLine ndkbuild, '-C', file('src/main/jni').absolutePath

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'org.ros.rosjava_core:rosjava:0.1.+'

Global build.gradle file:

buildscript {

repositories {
    maven {
        url ""
dependencies {
    classpath ''

allprojects {
    repositories {

we are unable to import the relevant ROSJava classes as we get the error

Error:(38, 13) Failed to resolve: org.ros.rosjava_core:rosjava:0.1.+

Have we missed something out?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-18 01:19:16 -0500

Tav_PG gravatar image

updated 2019-07-21 20:52:28 -0500

Try and replace:

compile 'org.ros.rosjava_core:rosjava:0.1.+'


compile 'org.ros.rosjava_core:rosjava:0.3.6'

and (if you need messages)...:

compile 'org.ros.rosjava_messages:sensor_msgs:1.12.7'
compile 'org.ros.rosjava_messages:std_msgs:0.5.11'
compile 'org.ros.rosjava_messages:geometry_msgs:1.12.7'

If the above does not work then look at:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-02-09 13:46:14 -0500

Seen: 894 times

Last updated: Jul 21 '19