With the update of Android Studio Hedgehog | 2023.1.1 | Patch 2, Kotlin 1.7.0, and Gradle being set yet as 7.4, we have this error with not so much info on how to resolve it.
Has anyone else experienced this exact error or have ideas where to look?
it also gives Caused by: [CIRCULAR REFERENCE: com.android.tools.r8.kotlin.H]
error message at the end of the build output, but we have no circular dependencies within our app modules.
Changing minimumSDK from 22 to 26 in project level build.gradle, solved my issue.
defaultConfig {
minSdk 26
targetSdk 33
}
Also had same issue when migrating project to Android 14 i.e sdk 33 to 34. Was able to run app, create release variant apk but getting this exception when creating debug variant apk. Added this to project level gradle & finally no issues.
buildscript {
repositories {
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:8.3.37")
}
}
Using following config:
Probably issue is in r8 version, so forcing this latest version resolved our problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With