In my android/build.gradle file I change this:
buildscript {
ext {
// ...
kotlin_version = '1.6.10' // <- add this line
}
dependencies {
// ...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // <- add this line
// ...
}
}
and I also add increased the memory in android/gradle.properties:
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
With this, I was able to run and work again.