If anyone face this issue in future kindly check the following versions of dependencies and classpath
ext.kotlin_version = "1.4.32"
Esure that the gradle-wrapper.properties has the compitable
distribution url with your kotlin version
distributionUrl=https://services.gradle.org/distributions/gradle-6.9-bin.zip
App level build.gradle check
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3'
Note: Check these dependencies it might be causing the issue, In my case coroutines-android was using 1.6.0-RC2 which is very latest version of coroutine then I checked the github releases and got the right version for my project gradle configuration
You can check the kotlinx-coroutines-android version from github releases section
https://github.com/Kotlin/kotlinx.coroutines/releases
You can also check the core-ktx version from developer.android.com
https://developer.android.com/jetpack/androidx/releases/core