Home > Back-end >  BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsup
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsup

Time:12-10

Bug when first trying to run a brand new React Native application.

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

I encountered this error when I first installed the latest version of Java

java 19.0.1

and creating a React Native application that auto generated with

react-native dependency v0.70.6

CodePudding user response:

SOLUTION:

This is a dependency issue and we need the latest version of Gradle to support Java 19.

In your React Native application folder, nav to android/gradle/wrapper/gradle-wrapper.properties

Find the distributionUrl variable and change the end path to gradle-7.6-all.zip

  • Related