0

I follow this tutorial https://github.com/ologic/Tango/wiki/Getting-Started-with-Tango-and-ROS to import the project.

When I try to make the project with catkin_make, I have this error:

    UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lorg/ros/android/MessageCallable;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
    at com.android.dx.command.dexer.Main.run(Main.java:230)
    at com.android.dx.command.dexer.Main.main(Main.java:199)
    at com.android.dx.command.Main.main(Main.java:103)

I try many issue to fix it, whit no result.

the project's build.gradle :

task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}

buildscript {
    def rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':').collect     { 'file://' + it }
    def rosMavenRepository = "$System.env.ROS_MAVEN_REPOSITORY"
    repositories {
        rosMavenPath.each { p ->
            maven {
                url p
            }
        }
        mavenLocal()
        maven {
            url rosMavenRepository
        }
    }
    dependencies {
        classpath group: 'org.ros.rosjava_bootstrap', name:   'gradle_plugins', version: '[0.1,0.2)'
    }
}

apply plugin: 'catkin'

allprojects {
    group 'com.github.rosjava.android_extras'
    version = project.catkin.pkg.version
}

subprojects {
    apply plugin: 'ros-android'
}

and subproject's build.gradle which poses problem:

dependencies {
  compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,)'
  compile 'org.ros.android_core:android_acm_serial:[0.1,)'
  compile 'com.github.rosjava.rosjava_extras:hokuyo:[0.1,)'
}

apply plugin: 'android'

android {
  packagingOptions {
    /* https://github.com/rosjava/android_core/issues/194 */
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
  }
  compileSdkVersion 13

}

Please, anybody can help me ? (Sorry for my poor english)

  • 1
    Possible duplicate of [Gradle DSL method not found : 'multiDexEnabled()'](https://stackoverflow.com/questions/26908228/gradle-dsl-method-not-found-multidexenabled) – Shirish Herwade Jun 13 '17 at 11:38

1 Answers1

1

add this to your application gradle file in android section.

android{
    defaultConfig {
            //other detail like version name ,application id etc;
            multiDexEnabled true
        }
}
KDeogharkar
  • 10,939
  • 7
  • 51
  • 95
  • 4
    Thank you, I already try this issue whit no result. Without this I have a UNEXPECTED TOP-LEVEL EXCEPTION: and whit I have : Could not find method multiDexEnabled() for arguments [true] – Matthieu Cotton Apr 29 '16 at 08:36