"Platform Android is not a valid platform to build. Check that the SDK is installed properly."

i’m having an issue, as the jdk 18 is not working. Instead when i select the “jre_1.8.0” folder it works but i get an error from gradle