Akriti Anand
Akriti Anand

Reputation: 186

Error when upgrading Android Studio to gradle version 5.6.4

A problem occurred configuring project ':feature-ABC'.
> 'kotlin-android' expects one of the Android Gradle plugins to be applied to the project:
    * android
    * com.android.application
    * android-library
    * com.android.library
    * com.android.test
    * com.android.feature
    * com.android.dynamic-feature
    * com.android.instantapp

Gradle build is failing for an existing project after updating Android Studio gradle to 5.6.4. My plugin version is 3.6.1. It was previously working for Android Studio gradle 5.2.1 and plugin version 3.3.0.

I am relatively new to Android Studio so please ignore my ignorance about something basic that I might be missing. But this error really has me stumped.

EDIT: Posting build.gradle file

apply from: rootProject.file('jacoco-full-report.gradle')

buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://maven.google.com" }
        maven { url "https://microsoft-maps.bintray.com/Maven" }
    }

    dependencies {
        apply from: 'dependencies.gradle'
        classpath pluginDep.androidGradle
        classpath pluginDep.jacoco
        classpath pluginDep.kotlin
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://www.jitpack.io" }
        mavenCentral()
    }

    jacoco {
        toolVersion = '0.8.2'
    }
}

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

Upvotes: 0

Views: 448

Answers (1)

Akriti Anand
Akriti Anand

Reputation: 186

I realise the source of the error now.

com.android.feature and various other plugins have been deprecated in the newer gradle version. So either I had to migrate to new plugins (instant apps) or revert to old gradle (which I am doing because this a collaborative project and I don't have the authority to make structural changes)

Upvotes: 1

Related Questions