07-20-2023, 09:29 AM
Go to the file build.gradle, change the version of kotlin.
In case in my flutter project I opened build.gradle and changed
`ext.kotlin_version = '1.5.30'`
to
`ext.kotlin_version = '1.6.0'`
Here
buildscript {
ext.kotlin_version = '1.6.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
----------------------------------------
Then save and do
`flutter clean` and `flutter run`.
Works fine for me.
In case in my flutter project I opened build.gradle and changed
`ext.kotlin_version = '1.5.30'`
to
`ext.kotlin_version = '1.6.0'`
Here
buildscript {
ext.kotlin_version = '1.6.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
----------------------------------------
Then save and do
`flutter clean` and `flutter run`.
Works fine for me.