Recently I faced the problem with this error in Flutter App development Android Studio, Execution failed for task ':app:compileDebugKotlin'.
Solution: 1 open project level build.gradle then replace your ext.kotlin_version = '1.4.32' with new version according to release so I replaced ext.kotlin_version = '1.4.32' with this ext.kotlin_version = '1.6.0' and solved.