nie mogłem określić wersji Java od

Updating gradle/wrapper/gradle-wrapper.properties
with the following version fixed it for me:

https\://services.gradle.org/distributions/gradle-7.0.3-all.zip
"latest version of gradel when you search"
android developer