简体   繁体   中英

Build failed with an exception react-native

got this error when running this command react-native run-android

I even tried so many things to deal with this like degrade your Java SDK version from 13 to 11, but nothing solved the issue.

here is the information about the error.

  • Where: Build file 'G:\react\react-native\albums\android\app\build.gradle'

  • What went wrong: Could not compile build file 'G:\react\react-native\albums\android\app\build.gradle'.

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

Thank you in advance.

It is an issue with the jdk version. Kindly share your gradle You can try to check your classpath in the gradle build file and update the latest version(3.5.0). The latest jdk versions(11,12 and 13) works fine with the latest android plugin(3.5.0). 3.5.1 is already out but has issues too. I would prefer 3.5.0 for now.

classpath 'com.android.tools.build:gradle:3.5.0'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM