class file for androidx.appcompat.app.AppCompatActivity not found

Viewed 792

I'm using the following information on my build.gradel file:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 30
    defaultConfig {

        // AR Optional apps must declare minSdkVersion >= 14.
        // AR Required apps must declare minSdkVersion >= 24.
        minSdkVersion 23
        targetSdkVersion 30
        versionCode 1
        versionName '1.0'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    // ARCore (Google Play Services for AR) library.
    implementation 'com.google.ar:core:1.25.0'

    // Obj - a simple Wavefront OBJ file loader
    // https://github.com/javagl/Obj
    implementation 'de.javagl:obj:0.2.1'

    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
}

I have the following flags in my gradel.properties file:

android.useAndroidX=true
android.enableJetifier=true

Does anyone knows how to solve the error "class file androidx.appcompat.app.AppCompatActivity not found"?

The class is being called from inside an aar library file. The class which extends the AppCompatActivity class does an import of the class file.

This implementation is of a Cordova plugin located on https://github.com/ruption-lda/ruption-ar-cordova-plugin

1 Answers

I've downloaded appcompat from a maven repository and added the appcompat aar as a lib-file to the project.

Related