Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Sync Issue #13

Open
madhankumardroid opened this issue Jul 21, 2024 · 2 comments
Open

Gradle Sync Issue #13

madhankumardroid opened this issue Jul 21, 2024 · 2 comments

Comments

@madhankumardroid
Copy link

I am using Android Studio Koala | 2024.1.1 in Windows 11. I cloned this project and tried to do the Gradle project sync. I am getting the below errors

Error 1:
:prepareKotlinBuildScriptModel
Caused by: org.gradle.api.internal.provider.AbstractProperty$PropertyQueryException: Failed to calculate the value of task ':androidApp:compileDebugJavaWithJavac' property 'javaCompiler'.

Caused by: org.gradle.jvm.toolchain.internal.NoToolchainAvailableException: Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=11, vendor=any, implementation=vendor-specific} for WINDOWS on x86_64.

Caused by: org.gradle.jvm.toolchain.internal.ToolchainDownloadFailedException: No locally installed toolchains match and toolchain download repositories have not been configured.

Caused by: org.gradle.api.internal.provider.AbstractProperty$PropertyQueryException: Failed to calculate the value of task ':shared:compileDebugJavaWithJavac' property 'javaCompiler'.

Caused by: org.gradle.jvm.toolchain.internal.NoToolchainAvailableException: Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=11, vendor=any, implementation=vendor-specific} for WINDOWS on x86_64.

Caused by: org.gradle.jvm.toolchain.internal.ToolchainDownloadFailedException: No locally installed toolchains match and toolchain download repositories have not been configured.

Caused by: org.gradle.api.internal.provider.AbstractProperty$PropertyQueryException: Failed to calculate the value of task ':tvApp:compileDebugJavaWithJavac' property 'javaCompiler'.

Caused by: org.gradle.jvm.toolchain.internal.NoToolchainAvailableException: Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=11, vendor=any, implementation=vendor-specific} for WINDOWS on x86_64.

Caused by: org.gradle.jvm.toolchain.internal.ToolchainDownloadFailedException: No locally installed toolchains match and toolchain download repositories have not been configured.

===============

Error 2:
Multiple build operations failed.
Could not create task ':androidApp:compileDebugJavaWithJavac'.
Could not create task ':shared:compileDebugJavaWithJavac'.
Could not create task ':tvApp:compileDebugJavaWithJavac'.
Could not create task ':androidApp:compileDebugJavaWithJavac'.
Failed to calculate the value of task ':androidApp:compileDebugJavaWithJavac' property 'javaCompiler'.
Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=11, vendor=any, implementation=vendor-specific} for WINDOWS on x86_64.
No locally installed toolchains match and toolchain download repositories have not been configured.

@SaeedZiaPligence
Copy link

@madhankumardroid

  1. download and install jdk 11 from https://www.oracle.com/
  2. Compile and run project

@MubarakNative
Copy link

You need to update your Java Version to support appropriate Gradle Version :
Compatability Matrix

Ctrl + Alt + S ( to open settings), Search For Gradle you can find this under (Build Tools) Below Update your Gradle JDK to appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants