I’ve just updated my android studio to android studio arctic fox and also I’ve updated some of my plugins. I also updated Gradle to Gradle 7.0 in the middle of Gradle building , I faced this error. I tried some solutions like adding or removing applicationId in my presentation gradle module and also in my conductor but none of them helped. I tried the solution said that applicationId have to be exactly the same in manifest file package name but It didn’t work out.I’m sharing my presentation
and conductor
gradle module so If it needs more to be shared please tell me.
So what should I do now ?
Presentation gradle module:
plugins {
id ("com.android.library")
id ("kotlin-android")
id ("com.google.gms.google-services")
}
android {
compileSdkVersion (30)
buildToolsVersion ("30.0.2")
defaultConfig {
minSdkVersion (19)
targetSdkVersion (30)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
getByName("release") {
this.isMinifyEnabled = false
proguardFiles (getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
//dependencies
Conductor(App) gradle module:
plugins {
id("com.android.application")
id("kotlin-android")
this.kotlin("kapt")
// id("dagger.hilt.android.plugin")
}
android {
compileSdkVersion(30)
buildToolsVersion ("30.0.2")
defaultConfig {
applicationId = "ir.raamaan"
minSdkVersion (19)
targetSdkVersion (30)
versionCode = 1
versionName = "1.0"
multiDexEnabled = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
getByName("release") {
this.isMinifyEnabled = true
proguardFiles (getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
3
Answers
This error goes away with Android Gradle Plugin Version 7.1.0-alpha05.
I got this same error while upgrading gradle:
And the solution that worked for me was to update the kotlin-gradle-plugin (I had to solve sintax errors after this like the exhaustive "when" error):
Worked when Android Gradle Plugin Version was downgraded to 7.1.3