problem was found with the configuration of task ':app:processDebugResources' (type 'LinkApplicationAndroidResourcesTask').
In plugin 'com.android.internal.version-check' type 'com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask' property 'androidJarInput.androidJar' specifies file 'C:\Users\NISHANT\AppData\Local\Android\sdk\platforms\android-31\android.jar' which doesn't exist.
Reason: An input file was expected to be present but it doesn't exist.