Application building failure

I am developing react native project,
when I run the ‘npm run android’ I am getting errors here i mentioned the error,

* Where:
Build file 'D:\ProjectV\VoicePurchaseOrderApp\node_modules\react-native-voice\android\build.gradle' line: 63

* What went wrong:
A problem occurred evaluating project ':react-native-voice'.
> Could not find method compile() for arguments [com.android.support:appcompat-v7:${supportVersion}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Build file 'D:\ProjectV\VoicePurchaseOrderApp\node_modules\react-native-voice\android\build.gradle' line: 63 * What went wrong: A problem occurred evaluating project ':react-native-voice'. > Could not find method compile() for arguments [com.android.support:appcompat-v7:${supportVersion}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 3s.
info Run CLI with --verbose flag for more details.

Your react-native-voice dependency is not compatible with usage in Gradle 7 or newer.
Make the maintainer update it, or if unmaintained search for an alternative, or as a temporary measure downgrade your Gradle version.