FAILURE: Build failed with an exception.
* Where:
Build file '/bitrise/src/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> 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.home` in `gradle.properties`.
Gradle detects locally installed JVMs Gradle chooses a JRE/JDK matching the requirements of the build (in this case a JVM supporting Java 14) If no matching JVM is found, it will automatically download a matching JDK from AdoptOpenJDK
Does Android Gradle Plugin support the new gradle toolchains? https://docs.gradle.org/current/userguide/toolchains.html
Notable libraries / plugins / versions
- Running AGP 7.0.0-alpha03
- Kotlin 1.4.21
- Android Studio Arctic Fox Canary 3
- jvmTarget 1.8
- gradle wrapper 6.8-rc-1
App module gradle config below (some details removed)
android {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
kotlinOptions {
jvmTarget = Versions.jdkNumber
useIR = true
}
buildToolsVersion Config.buildToolsVersion
compileSdkVersion Config.compileSdk
buildFeatures {
compose true
dataBinding true
}
composeOptions {
kotlinCompilerVersion Versions.kotlin_version
kotlinCompilerExtensionVersion Versions.compose
}
androidExtensions {
experimental = true
}
}