android gradle plugin requires Java 11 to run, gradle task assembledebug failed with exit code 1

preview_player
Показать описание
gradle task assembledebug failed with exit code 1,
The error message "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8" indicates that you need to upgrade your Java version to Java 11 or higher in order to use the Android Gradle plugin.

To resolve this issue, you can follow these steps:

1: Download and install Java 11 or higher on your system. You can download the latest version of Java from the official Oracle website or use a package manager for your operating system.
2: Set the new Java version as the default version for your system. You can do this by updating your PATH environment variable to include the path to the Java 11 executable.

3: Update your Android Studio settings to use the new Java version. To do this, go to File -Project Structure SDK Location, and under the "JDK location" field, select the path to your Java 11 installation.

4: After updating the settings, restart Android Studio and try building your project again.

Join this channel to get access to perks:
Рекомендации по теме