You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, on some machines, if you do nothing except download Studio and download the code, you cannot build the code. You will instead get the following:
Your build is currently configured to use incompatible Java 21.0.3 and Gradle 8.2. Cannot sync the project.
We recommend upgrading to Gradle version 8.9.
The minimum compatible Gradle version is 8.5.
The maximum compatible Gradle JVM version is 19.
Possible solutions:
- Upgrade to Gradle 8.9 and re-sync
- Upgrade to Gradle 8.5 and re-sync
There's also the stack trace I can paste in, but I double much of it is useful since we probably should update gradle anyways
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':buildSrc:compileKotlin'.
Caused by: org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'compilerOptions.jvmTarget' of task ':buildSrc:compileKotlin'.
Caused by: org.gradle.api.internal.provider.AbstractProperty$PropertyQueryException: Failed to calculate the value of property 'jvmTarget'.
Caused by: java.lang.IllegalArgumentException: Unknown Kotlin JVM target: 21
at org.jetbrains.kotlin.gradle.dsl.JvmTarget$Companion.fromTarget(JvmTarget.kt:26)
at org.jetbrains.kotlin.gradle.tasks.DefaultKotlinJavaToolchain$wireJvmTargetToToolchain$1$1.invoke(DefaultKotlinJavaToolchain.kt:78)
at org.jetbrains.kotlin.gradle.tasks.DefaultKotlinJavaToolchain$wireJvmTargetToToolchain$1$1.invoke(DefaultKotlinJavaToolchain.kt:70)
...
The text was updated successfully, but these errors were encountered:
Interestingly, on this machine specifically, I'm also getting
org.gradle.jvm.toolchain.internal.NoToolchainAvailableException: Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=17, vendor=any vendor, implementation=vendor-specific} for WINDOWS on x86_64
Considering it's a brand new laptop, wouldn't be surprised if has something to do with windows 11 not actually shipping with java installed and Studio using only Java 21 as a backup
Seems Hedgehog, 2023.1.1 Patch 2, works. Supports the default AGP 8.2.2. Doesn't yell that Gradle is out of date and depreciated.
Had to flush the SDKs and JDK manually and reinstall.
Before creating
Problem Description
Currently, on some machines, if you do nothing except download Studio and download the code, you cannot build the code. You will instead get the following:
There's also the stack trace I can paste in, but I double much of it is useful since we probably should update gradle anyways
The text was updated successfully, but these errors were encountered: