With the help of @Robert answer,
I found out that the problem was with JAVA 17 and that the Gradle JDK in use was:
Android Studio java home version 17.0.1
I changed it to:
Android Studio default JDK version 11.0.10
Then everything worked like before…
You’ll find the Gradle Settings under File > Project Structure...