Build is failed while running run-android

info Running jetifier to migrate libraries to AndroidX. You can disable it using “–no-jetifier” flag.
Jetifier found 1112 file(s) to forward-jetify. Using 8 workers…
info Starting JS server…
‘adb’ is not recognized as an internal or external command,
operable program or batch file.
info Launching emulator…
error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app…
Starting a Gradle Daemon (subsequent builds will be faster)

Task :app:processDebugResources FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface
92 actionable tasks: 4 executed, 88 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:processDebugResources’.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Unable to delete directory ‘E:\React Native\RNProjects\AHHCSTAFF\android\app\build\generated\not_namespaced_r_class_sources\debug\r\androidx\appcompat’ after 10 attempts

  • 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 43s

error Failed to install the app. Make sure you have the Android development environment set up: Introduction · React Native. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:processDebugResources’.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Unable to delete directory ‘E:\React Native\RNProjects\AHHCSTAFF\android\app\build\generated\not_namespaced_r_class_sources\debug\r\androidx\appcompat’ after 10 attempts

  • 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 43s

at makeError (E:\React Native\RNProjects\AHHCSTAFF\node_modules\execa\index.js:174:9)
at E:\React Native\RNProjects\AHHCSTAFF\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (E:\React Native\RNProjects\AHHCSTAFF\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (E:\React Native\RNProjects\AHHCSTAFF\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)