Cordova Build Error

good day sorry been trying aimlessly to build my first ionic project but am stuck not being able to build with the below error please can anyone help out?

this is the error on my command line

cordova.cmd build android
Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: C:\Users\hp\AppData\Local\Android\Sdk Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)

Task :CordovaLib:compileDebugJavaWithJavac FAILED FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ‘:CordovaLib:compileDebugJavaWithJavac’.
java.lang.NullPointerException (no error message) * 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 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 BUILD FAILED in 44s

19 actionable tasks: 1 executed, 18 up-to-date
Command failed with exit code 1: C:\Users\hp\Desktop\projects\apps\spotze\v0.1\platforms\android\gradlew cdvBuildDebug -b C:\Users\hp\Desktop\projects\apps\spotze\v0.1\platforms\android\build.gradle [ERROR] An error occurred while running subprocess cordova. cordova.cmd build android exited with exit code 1. Re-running this command with the --verbose flag may provide more information.

please can someone show me the right path asap

I think you haven’t installed the Android SDK

Run this command in your project to test

cordova requirements android --verbose