Inability to successfully run my code
Description
It could not open generic class cache, here is the error message ` What went wrong: Could not open settings generic class cache for settings file 'C:\Users\Hp\Desktop\Atua\Atua2023\android\settings.gradle' (C:\Users\Hp.gradle\caches\7.5.1\scripts\86imyyu5nmjwsnruvxilo1zmm).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63 `
Steps to reproduce
- npm start
- npm run android or a
- FAILURE: Build failed with an exception.
- What went wrong: Could not open settings generic class cache for settings file 'C:\Users\Hp\Desktop\Atua\Atua2023\android\settings.gradle' (C:\Users\Hp.gradle\caches\7.5.1\scripts\86imyyu5nmjwsnruvxilo1zmm).
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 3s
React Native Version
0.73.1
Affected Platforms
Runtime - Desktop
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.22000
CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Memory: 1.06 GB / 7.88 GB
Binaries:
Node:
version: 20.11.0
path: C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm:
version: 9.8.1
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-231.9392.1.2311.11255304
Visual Studio: Not Found
Languages:
Java: 19.0.2
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.5
wanted: 0.72.5
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
r - reload the app
d - open developer menu
i - run on iOS
a - run on Android
info Opening the app on Android...
info JS server already running.
info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\Hp\Desktop\Atua\Atua2023\android\settings.gradle' (C:\Users\Hp\.gradle\caches\7.5.1\scripts\86imyyu5nmjwsnruvxilo1zmm).
> 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 3s
Reproducer
https://github.com/elkee2003/Atua2023.git
Screenshots and Videos
No response
| :warning: | Newer Version of React Native is Available! |
|---|---|
| :information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.73.4. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
This is unrelated to React Native but more of a problem of Android: https://stackoverflow.com/questions/67240279/could-not-open-settings-generic-class-cache-for-settings-file
I see you have Java: 19.0.2 which is not recommened. Consider using Java 17 instead