简体   繁体   English

React Native运行android Build失败并出现异常

[英]React Native run android Build failed with an exception

I try this command on Mac terminal 我在Mac终端上尝试此命令

  react-native run-android

and got this error 并得到这个错误

  FAILURE: Build failed with an exception.

   * Where:
    Build file '/Users/web2/AwesomeProject/android/app/build.gradle' line: 1

   * What went wrong:
   A problem occurred evaluating project ':app'.

java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0 java.lang.UnsupportedClassVersionError:com / android / build / gradle / AppPlugin:不支持的major.minor版本52.0

  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  BUILD FAILED

I have installed 我已经安装

  java version "1.6.0_65"

Thanks 谢谢

我通过将Java版本1.6更新为1.8来解决此错误:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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