-
Notifications
You must be signed in to change notification settings - Fork 0
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
Snoy-Kuo edited this page Mar 29, 2022
·
2 revisions
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.
- changing the JAVA_HOME environment variable.
- changing
org.gradle.java.homeingradle.properties.
I cannot build the Android Studio project with above message on Jenkins.
- macOS 11.6 (Big Sur) x64
- Android Studio Bumblebee Patch 1
- Android SDK version 31
- Android Gradle Plugin: 4.1.3
- Gradle: 7.1.1
- Gradle JDK: corretto-1.8
- Kotlin: 1.6.10
- Jenkins 2.190.2
-
Error message "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8"
- change Gradle JDK version in Android Studio> Gradle Settings.
=> Not work for me. This works when build locally.
- change Gradle JDK version in Android Studio> Gradle Settings.
-
Update jdk version on Jenkins to 11, or install version 11 jdk for option.
=> This maybe help, but I don't have permission to config Jenkins.
- The DevOps helped me install JDK 11 in the node where Build Job runs. Then I update the JAVA_HOME env var temporarily in my building script. This works for me.
- If you use a Freestyle Job, you can add
export JAVA_HOME=your_jdk11_pathin the building script. - If you use a Declarative Pipeline Job, you can add
JAVA_HOME='your_jdk11_path'in the environment section.
- If you use a Freestyle Job, you can add