Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Instead of placing the ros-android plugin in the bottom level Gradle file, leave the bottom level as is. Just add android_10 to the dependencies and remove the espresso from AndroidTestCompile.

Your bottom level script should look like something like this:

apply plugin: ''

android {
    compileSdkVersion 26
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.project.androidrostest"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner ""
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), ''

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile ''
    compile ''
    testCompile 'junit:junit:4.12'
    compile 'org.ros.android_core:android_10:[0.3,0.4)'    // Added dependency!!!

In your top-level script, replace the buildscript as the tutorial indicates:

buildscript {
    apply from: ""

And add the following:

subprojects {
    apply plugin: 'ros-android'

    afterEvaluate { project ->
        android {
            // Exclude a few files that are duplicated across our dependencies and
            // prevent packaging Android applications.
            packagingOptions {
                exclude "META-INF/LICENSE.txt"
                exclude "META-INF/NOTICE.txt"

Note: you might need to remove the android:icon from the manifest or indicate to replace it with another one, as android_10 already provides a default.

Let me know if it worked. If it does, I will update the tutorial.