ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

class sensor_msgs.CompressedImage, unresolved supertypes: org.ros.internal.message.Message> Task:app:buildInfoGeneratorDebug

asked 2019-07-22 18:12:25 -0500

Tav_PG gravatar image

I can't compile my Android Kotlin Project because I get the following 'Kotlin compiler' error when gradle compiles:

Supertypes of the following classes cannot be resolved. Please make sure 
you have the required dependencies in the classpath: class 
sensor_msgs.CompressedImage, unresolved supertypes: 
org.ros.internal.message.Message> Task:app:buildInfoGeneratorDebug

This is a simple test project that has the bare minimum code using as a boilerplate. I removed the joystick code but left the camera code.

A am using ROS Kinetic Ubuntu on the robot, Android 8.0 on the app.


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
          xmlns:tools="" package="">

            android:theme="@style/AppTheme" tools:replace="android:icon">
        <activity android:name=".MainActivity">
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
        <activity android:name="" />

        <service android:name="" >
                <action android:name="" />


build.gradle (Project):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.3.41'
    repositories {

dependencies {
        classpath ''
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

allprojects {
    repositories {

task clean(type: Delete) {
    delete rootProject.buildDir

build.gradle (Module):

apply plugin: ''

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId ""
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner ""
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), ''
    configurations.all {
        resolutionStrategy.force "org.ros.android_core:android_15:0.3.3"

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'org.ros.android_core:android_15:0.3.3'
    //noinspection GradleCompatible
    implementation ''
    implementation ''
    testImplementation 'junit:junit:4.12'
    //androidTestImplementation ''
    androidTestImplementation ''

repositories {
    maven {  url '' }
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-11 23:47:41 -0500

Tav_PG gravatar image

I have since resolved this issue. It is not completely a ROS issue.

I had found the issue was when I changed from AppCompatActivity to RosActivity, so I looked at all controls in the main form to see which classes they were using. Classes were being called in a mix of both and I moved all my controls in my RosActivity form over from android to android-x and there was no compile error.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-07-22 18:12:25 -0500

Seen: 354 times

Last updated: Aug 11 '19