Android Gradle plugin requires Java 11 to run . You are currently using Java 1.8. You can try some of the following options: – changing the IDE settings.
Read moreWhat version of Java does Android 11 use?
Java 8 APIs are available starting with Android 8 (API level 26). Some Java 9 APIs (like List. of()) are available starting with Android 11 (API level 30).22 Ara 2020
Read moreWhich version of Java is used for Android?
Current versions of Android use the latest Java language and its libraries (but not full graphical user interface (GUI) frameworks), not the Apache Harmony Java implementation, that older versions used. Java 8 source code that works in latest version of Android, can be made to work in older versions of Android.
Read more