I upgraded to Android Studio (2020.3.1) Canary 15 and started to get compiler errors.
The error generated is
e: This version (1.0.0-alpha13) of the Compose Compiler requires Kotlin version 1.4.30 but you appear to be using Kotlin version 1.4.32 which is not known to be compatible. Please fix your configuration (or
suppressKotlinVersionCompatibilityCheck
but don't say I didn't warn you!).
App configuration versions are:
ext {
gms_version = "4.3.5"
agp_version = '7.0.0-alpha15'
ktlint_version = "10.0.0"
kotlin_version = "1.4.32"
detekt_version = "1.16.0"
versions_version = "0.36.0"
dagger_version = "2.34.1-beta"
crashlytics_gradle_version = "2.5.2"
sceneform_version = "1.17.1"
nav_version = "2.3.5"
compose_version = "1.0.0-beta05"
}
dependencies {
...
// Compose dependencies
implementation composeDependencies.composeUi
implementation composeDependencies.composeTooling
implementation composeDependencies.composeFoundation
implementation composeDependencies.composeMaterial
implementation composeDependencies.composeViewModel
implementation networkDependencies.retrofit
}
I have looked a similar issue that talk about this this issue, but it doesn't seem relevant in my case since I am not using a Compose activity.
Android Studio - Arctic Fox | 2020.3.
Android Studio 2021.1 “Bumblebee” has a new Device Manager and improved Apple Silicon support. Android Studio is the main integrated development environment (IDE) for creating Android applications, with a feature-packed code editor, debugging tools, emulators, and much more.
Android note :
In the buildscript > dependencies
:
Change
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5"
To
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30"
I put 1.4.30 cause in my case didn't works on 1.4.32.
Link from info in this tutorial : Layouts in Jetpack Compose
I had the same problem, what i did was change in build.gradle:
"classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5"
to
"classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30"
You can downgrade to 1.4.30 or you can add a compiler option to ignore the warning
kotlinOptions {
val options = listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
)
freeCompilerArgs = freeCompilerArgs + options
}
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