Closed ChurikiTenna closed 1 year ago
Java: 18.0.2 - /usr/bin/javac
What's your Gradle versions? You can find it inside the android/gradle/gradle-wrapper.properties
file.
I believe you're on a old Gradle version which doesn't support Java 18. As an alternative, movign to JDK 11 should solve your issue.
I'm having the same error: A problem occurred configuring root project 'LittleLemonNewsletterFinal'.
Could not open proj generic class cache for build file 'D:\LittleLemonNewsletterFinal\LittleLemonNewsletterFinal\android\build.gradle' (C:\Users\Owner.gradle\caches\7.5.1\scripts\akkbmo69g46wo5egmq4ch1csu). BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63
Closing as @ChurikiTenna is unresponsive. Feel free to re-open if the issue persists
Same issue here.
same issue here
same issue here
same issue here
same issue here
Changing the distribution url in gradle-wrapper.properties to 7.6
i face same error and I solved my problem install idk 11; follow this AndroidStudio->file->ProjectStructure->click Gradle Settings->choose idk 11
Changing the distribution url in gradle-wrapper.properties to 7.6
That works! Thank you!
but which distribution of gradle (7.6-all.zip or 7.6-bin.zip . . .
What about eas build?
Changing the distribution url in gradle-wrapper.properties to 7.6
The right solution, thanks men
SOLUTION:
go to android/gradle/wrapper/gradle-wrapper.properties
Find the distributionUrl variable and change the end path to gradle-7.6-all.zip
Changing the distribution url in gradle-wrapper.properties to 7.6
thx dude, it's work for linux mint 21.1!!
Changing the distribution url in gradle-wrapper.properties to 7.6
This doesn't seem to work anymore, as EAS just decides to use 7.5.1 no matter how many times gradle-wrapper.properties
is changed.
If someone else is still in problems with this, the solution, in my case was to align my version of Gradle with the Java one. There is a compatibility matrix that explains which version of Gradle works with which version of Java. By aligning them, it worked on my env.
Can confirm. I started having this bug every now and then only after I upgraded the JDK version and the solution for me since I'm not planning on downgrading the JDK, was to instead delete the .gradle
and build
directories when this happens. Though it's strange that the behavior isn't deterministic. My guess is there are multiple versions of JDK being used by IDE/Gradle/etc.
Any solution for React Native Expo ? expo run:android
Any solution for React Native Expo ? expo run:android
same issue
Any solution for React Native Expo ? expo run:android
same issue
Not Yet! Will update here once fix my side.
expo run:android
or npx react-native run-android
commands :I came to understand that if you are in a managed Expo app, and you want to build your app locally , expo advises to use the "new way" of building locally with eas build
(as documented here)
The major issue for me here is that creating the local build this way with eas build
will count in your build usage on expo.dev.
Moreover, ios
and android
folders are generated if you are in a managed workflow , meaning you cannot change the gradle version as advised in this comment for example because this setting will be overriden the next time you perform a build via eas build
command
expo run:android
or react-native run-android
The problem was the gradle version set by Expo was not compatible with the java runtime version installed on my machine
gradle
used by Expo, in android/gradle/wrapper/gradle-wrapper.properties
@abdul-megadraws @nikitaGrynch
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 65
what should i do ? also having this error too - "Your project's Gradle version is incompatible with the Java version that Flutter is using for Gradle. "
Help me to overcome this ...
@NaveenG46 having same issue as you, funny no one has found a solution
@NaveenG46 @Red3nzo I have the same problem. I am trying to use realm with expo on a bare workflow but none of the solutions I've found have worked.
I used the template given by expo. but I couldn't run it because I couldn't create a build.
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66
I'm sorry to hear that you're having trouble with using Realm in an Expo bare workflow. Here are some steps you might find helpful:
Initialize the project: You can start a new project with the npx create-expo-app
command. If you're using MongoDB Realm, you can use this command: expo init ReplaceWithNameOfYourAPP --template @realm/expo-template-ts
.
Rename App.js to App.tsx: If you're using TypeScript, you'll need to rename your App.js
file to App.tsx
.
Create a tsconfig.json: You'll need a tsconfig.json
file in your project root. You can create one with the touch tsconfig.json
command.
Run the project: After setting up, you can run your project with yarn start
or npm run start
.
**Run the expo diagnostics
command "inside your project" might also help provide further details of your error:
i've found this to be useful.
Check the Java version used by Flutter: You can do this by running flutter doctor --verbose
.
Update the Gradle version: You need to update the Gradle version specified in your android/gradle/wrapper/gradle-wrapper.properties
file to be compatible with the Java version. For Java 17, you should use Gradle 7.3 or newer.
Change the Java version: If updating Gradle doesn't work, you can change the Java version used by your project. You can do this by adding or changing org.gradle.java.home
in your gradle.properties
file to point to the appropriate Java version.
Always good to recheck your basic steps as well.
if your having trouble with using Realm in an Expo bare workflow. Here are some steps you might find helpful:
Initialize the project: You can start a new project with the npx create-expo-app
command³. If you're using MongoDB Realm, you can use this command: expo init ReplaceWithNameOfYourAPP --template @realm/expo-template-ts
.
Rename App.js to App.tsx: If you're using TypeScript, you'll need to rename your App.js
file to App.tsx
.
Create a tsconfig.json: You'll need a tsconfig.json
file in your project root. You can create one with the touch tsconfig.json
command.
Run the project: After setting up, you can run your project with yarn start
or npm run start
.
Remember, the bare workflow requires a good understanding of native development for both iOS and Android platforms. Developers should be familiar with Objective-C, Swift, Java, and Kotlin, in addition to JavaScript.
@NaveenG46 having same issue as you, funny no one has found a solution
scroll up from here
BUG! exception in phase 'semantic analysis' in source unit '/Users/aswin/Desktop/dev/flutter/packages/flutter_tools/gradle/src/main/groovy/app_plugin_loader.groovy' Unsupported class file major version 64
what to do???
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63
Description
I have done everything this page said: https://reactnative.dev/docs/environment-setup. M1 Mac
Version
0.7
Output of
npx react-native info
warn Package react-native-navigation contains invalid configuration: "dependency.assets" is not allowed,"dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this. info Fetching system and libraries information... System: OS: macOS 12.5 CPU: (8) arm64 Apple M1 Memory: 114.81 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.11.0 - ~/.nodebrew/current/bin/node Yarn: 3.2.3 - ~/.yarn/bin/yarn npm: 8.0.0 - ~/.nodebrew/current/bin/npm Watchman: 2022.09.26.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild Languages: Java: 18.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: ^18.2.0 => 18.2.0 react-native: ^0.70.1 => 0.70.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
I can give an access to the repository if that'll help.
Snack, code example, screenshot, or link to a repository
I can give an access to the repository if that'll help. I am struggling with errors that coming on and on for days... Please help..