I’ve setup the environment for react native on Windows. But when I run the command

react-native run-android
I get the following errors –

* What went wrong:
A problem occurred configuring project ‘:app’.
> Failed to notify project evaluation listener.
> Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
How do I fix this?

Question is closed for new answers.
Nilesh Raut Selected answer as best July 20, 2023