Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but wonβt spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
Error

Solution
Changing this in the file build.gradle solved my problem.
From
ext.kotlin_version = '1.3.50'
to
ext.kotlin_version = '1.6.0'
I had this problem in a Flutter project.
In my case, a line for kotlin-gradle-plugin was missing in the Android build.gradle file, so adding ext.kotlin_version = β1.6.10β didnβt fix it.
After adding
classpath βorg.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_versionβ
the error was gone.
Full code section:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext.kotlin_version = '1.6.10' | |
repositories { | |
google() | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:4.1.0' | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} |