question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgraded JDK 16 react-native run android problem Gradle Complaining

See original GitHub issue

Could not compile settings file ‘C:\Users\Scott\rn\mc\android\settings.gradle’.

startup failed: General error during semantic analysis: Unsupported class file major version 60

I have a Gradle home system environment variable set Gradle version 7.0.2 currently on Windows 10.

I don’t see that as the issue with Gradle since I’m using npx.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

70reactions
machariavckcommented, Jul 23, 2021

Go fix this file in your app folder and your problems should be over.

code android/gradle/wrapper/gradle-wrapper.properties

change

distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

to

distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip

@dangolbeeker I think you had a typo when changing this file

12reactions
sameem420commented, Dec 25, 2021

@dangolbeeker Try this. No need to downgrade anything.

in my case Just changed gradle version in gradle-wrapper.properties to 7.2 or latest version of gradle like this :

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

and adding the following line in gradle.properties:

org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Error with react-native run-android after upgrade to react ...
One of the reason for the same is: Java version 16 installed which is not yet supported by react-native. So For MacOS, cd...
Read more >
How to Build from Source - React Native
Update the android/build.gradle to make sure you're using AGP 7.x and add the highlighted lines. buildscript {
Read more >
Expo 45 build fail on Android with EAS
Hi All, I've upgraded the SDK version to 45 recently. … ... same Java version. > Task :react-native-gradle-plugin:pluginDescriptors > Task ...
Read more >
React Native Android : FAILURE: Build failed with an ...
This is an issue with how Gradle is automating the build and the current version of the JDK installed on your machine, the...
Read more >
Kotlin version conflict when using Kotlin Gradle plugins in pre ...
0") } and in the pre-compiled script plugin I do plugins { kotlin("js") } . But when I now try to run the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found