Error building Android app with rosjava
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 ( http://wiki.ros.org/rosjava/Tutorials... there is a Maven repository where the relevant dependencies are stored.
This is our app-level .gradle file:
apply plugin: 'com.android.application'
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()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
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 "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
}
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
allprojects {
repositories {
jcenter()
}
}
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?