# How to fix this? please help me!

**URL:** <https://discuss.gradle.org/t/how-to-fix-this-please-help-me/46483>\
**Category:** Help/Discuss\
**Created:** [September 14, 2023, 1:45pm UTC](https://discuss.gradle.org/t/how-to-fix-this-please-help-me/46483 "2023-09-14T13:45:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam123](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam123](https://discuss.gradle.org/u/sam123)\
**Post date:** [September 14, 2023, 1:45pm UTC](https://discuss.gradle.org/t/how-to-fix-this-please-help-me/46483/1 "2023-09-14T13:45:49Z")

</div>

```plaintext
* What went wrong:
Could not open settings generic class cache for settings file 'F:\project567\android\settings.gradle' (C:\Users\Administrat
or\.gradle\caches\7.0.2\scripts\d3lhd1993j05j0lwav8dm03yn).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 64       

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --s
can to get full insights.

```

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [September 14, 2023, 4:53pm UTC](https://discuss.gradle.org/t/how-to-fix-this-please-help-me/46483/2 "2023-09-14T16:53:18Z")

</div>

You try to run a Gradle 7.0.2 build with Java 20, that is not supported, you need to use a compatible Java version: [Compatibility Matrix](https://docs.gradle.org/current/userguide/compatibility.html)

---

<div class="post-metadata">

**Author:** ![aoot](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@aoot](https://discuss.gradle.org/u/aoot)\
**Post date:** [April 11, 2024, 3:16am UTC](https://discuss.gradle.org/t/how-to-fix-this-please-help-me/46483/3 "2024-04-11T03:16:15Z")

</div>

For those who are novice like me, Java 20 was indicated by “major version 64” in the error output.

According to [this chart](https://en.wikipedia.org/wiki/Java_version_history), major version 64 is Java 20.

Then, according to [this chart](https://docs.gradle.org/current/userguide/compatibility.html), Java 20 needs Gradle 8.3 (instead of the 7.0.2) that OP is using.
