I know that the app itself should work, I just had to work on a different part of the project and when I came back to it, this error message suddenly popped up. No solution worked for me, so I am asking here.
If the picture above cant be seen, here is the message again:
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
There was a problem with the environmental variable. Deleting it and creating it anew, like in the Gradle documentation solved it for me.