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

FAILURE: Build failed with an exception. * What went wrong: Could not open settings generic class cache for settings file 'D:\project\tools\prouprint\android\settings.gradle' (D:\project\tools\gradle-7.5.1\caches\7.5.1\scripts\5o6jmz0o7vlzhu5xtvutuo3me). > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63 * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 772ms #1242

Closed
abdulrhman-alfeel opened this issue Oct 16, 2022 · 7 comments

Comments

@abdulrhman-alfeel
Copy link

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not open settings generic class cache for settings file 'D:\project\tools\prouprint\android\settings.gradle' (D:\project\tools\gradle-7.5.1\caches\7.5.1\scripts\5o6jmz0o7vlzhu5xtvutuo3me).

BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 772ms

@testforstephen
Copy link
Contributor

The error is that you're using JDK 19 (major version 63) to run your gradle project, that's not supported. See the compatibility matrix, gradle-7.5.1 only supports Java 18.

A quick suggestion is that you need to configure the VS Code settings java.import.gradle.java.home with a JDK compatible with your project.

@testforstephen testforstephen closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2022
@abdulrhman-alfeel
Copy link
Author

I removed jdk19 and installed jdk 17 and it worked, thanks for the solution testforstephen

@siddhantpriyadarshi18581

I installed JDK 18 but it is not yet working what to do now???

@panditakshay402
Copy link

@sidd

I installed JDK 18 but it is not yet working what to do now???

Hey , try jdk 17.
if still not working check you gradle version and check this

Java version First Gradle version to support it
8 2.0
9 4.3
10 4.7
11 5.0
12 5.4
13 6.0
14 6.3
15 6.7
16 7.0
17 7.3
18 7.5
19 7.6
20 8.1 ⚠
and
installed gradle according to this chart.

@prashanth586
Copy link

currently iam using jdk 17 and flutter version 2.0.1, but still iam facing the issue, can anyone provide solution for it.

@shebeeradly
Copy link

image

https://github.com/microsoft/vscode-java-debug/assets/108452829/0d357fa4-eac9-42e8-83ea-5385daf1bf3d try this link and will get an image in react native installation set up page , default version , then you goto

https://reactnative.dev/docs/environment-setup

or

image

@Shahabmustafa
Copy link

go to android folder > gradle > gradle-wrapper.properties open this file and change distributionUrl

before : distributionUrl=https://services.gradle.org/distributions/gradle-7.4-all.zip

After : distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip

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

No branches or pull requests

7 participants