Error: Program type already present:

asked 2019-07-21 23:03:49 -0500

Tav_PG gravatar image

I have a build an Android app. to control a robot using ROSJava. I can successfully connect to the robot ROS Master and add publishers and subscribers. I am now tasked to connect and subscribe to the image/compressed topic from the camera on the robot, to show on the Android app.

I have successfully subscribed to the image/compressed topic, so for the next step, I have moved onto using RosImageView.

To get the dependences for RosImageView I have used the following in my build.gradle:

implementation 'org.ros.android_core:android_15:0.3.3'

The gradle syncs with no problems but when running the application and as gradle builds the file I get:

Error: Program type already present:

I use…

    implementation ''

in the dependencies in my build.gradle file:

dependencies {
    // File Tree:
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    // Kotlin:
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation ''
    implementation ''
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1'        // co-routines

    // Crashlytics:
    implementation('') { transitive = true }

    // Ripple Animation:
    implementation 'com.skyfishjy.ripplebackground:library:1.0.1'

    // ArcGIS – Mapping
    implementation 'com.esri.arcgisruntime:arcgis-android:100.4.0'

    // JSch -   SSH for Android
    implementation 'com.jcraft:jsch:0.1.54'

    // LibVLC (video streaming):
    implementation 'de.mrmaffen:libvlc-android:2.1.12@aar'

    // ROS Android:
    implementation 'org.ros.android_core:android_15:0.3.3'      // Causing errors here

    // ROS Implementation:
    implementation 'org.ros.rosjava_core:rosjava:0.3.6'
    implementation 'org.ros.rosjava_messages:sensor_msgs:1.12.7'
    implementation 'org.ros.rosjava_messages:std_msgs:0.5.11'
    implementation 'org.ros.rosjava_messages:geometry_msgs:1.12.7'

repositories {
    mavenCentral()      // Maven Repository
    jcenter()           // Bintray JCenter repository for Kotlin Coroutines
    maven { url '' }
    maven { url '' }
    maven {  url '' }

How do I resolve this issue?

edit retag flag offensive close merge delete