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
1条答案
按热度按时间mspsb9vt1#
解决方案:
这是一个依赖性问题,我们需要最新版本的Gradle来支持Java 19。
在React Native应用程序文件夹中,导航到
android/gradle/wrapper/gradle-wrapper.properties
找到
distributionUrl
变量并将结束路径更改为gradle-7.6-all.zip