简体   繁体   English

React-Native AppCenter 错误:需要 JDK11 或更高版本。 检测到不兼容的主要版本:“8”

[英]React-Native AppCenter ERROR: requires JDK11 or higher. Incompatible major version detected: '8'

i am getting this error when trying to build reactnative app in the cloud ( https://appcenter.ms )尝试在云中构建反应性应用程序时出现此错误( https://appcenter.ms

ERROR: requires JDK11 or higher.
Incompatible major version detected: '8'

any idea on how to resolve this please?请问如何解决这个问题?

full log:完整日志:

Welcomenter code heree to Gradle 7.2!

Here are the highlights of this release:
 - Toolchain support for Scala
 - More cache hits when Java source files have platform-specific line endings
 - More resilient remote HTTP build cache behavior

For more details see https://docs.gradle.org/7.2/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
Gradle 7.2

> Configure project :
Resolved com.android.tools.build:gradle:4.2.2 in :classpath 
Project DevotionHub at : is either no Android app project or build version has not been set to override. Skipping...

> Configure project :app




**************************************************************************************************************



ERROR: requires JDK11 or higher.
Incompatible major version detected: '8'



**************************************************************************************************************





The message received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=a4c936fe-dacd-4d69-b0cb-59e1fbc9d4ff, currentDir=/Users/runner/work/1/s}
Attempting to read last messages from the daemon log...
Daemon pid: 5439
  log file: /Users/runner/.gradle/daemon/7.2/daemon-5439.out.log
----- Last  20 lines from daemon log file - daemon-5439.out.log -----
Project DevotionHub at : is either no Android app project or build version has not been set to override. Skipping...




**************************************************************************************************************



ERROR: requires JDK11 or higher.
Incompatible major version detected: '8'



**************************************************************************************************************




Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a *** interrupt.
----- End of the daemon log -----


FAILURE: Build failed with an exception.

* What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

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

* Get more help at https://help.gradle.org
Error: /Users/runner/work/1/s/android/gradlew failed with return code: 1
    at ChildProcess.<anonymous> (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/1.128.0/node_modules/vsts-task-lib/toolrunner.js:569:30)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Socket.<anonymous> (internal/child_process.js:351:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:509:12)
##[error]Error: /Users/runner/work/1/s/android/gradlew failed with return code: 1
##[section]Finishing: Gradle Task
##[section]Starting: Sign APK
==============================================================================
Task         : Android signing
Description  : Sign and align Android APK files
Version      : 3.201.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/android-signing
==============================================================================
##[section]Finishing: Sign APK
##[section]Starting: Checkout devotionHub-mobileapp@test to s
==============================================================================
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: devotionHub-mobileapp (ExternalGit)
##[section]Finishing: Checkout devotionHub-mobileapp@test to s
##[section]Starting: Finalize Job
Cleaning up task key
Start cleaning up orphan processes.
##[section]Finishing: Finalize Job
##[section]Finishing: Build

Install the JDK11 first, then follow the answer in react-native repo issues.首先安装 JDK11,然后按照 react-native repo 问题中的答案进行操作。

https://github.com/facebook/react-native/issues/33731#issuecomment-1140252250 https://github.com/facebook/react-native/issues/33731#issuecomment-1140252250

Or Check the below thread或检查以下线程

https://github.com/microsoft/appcenter/issues/2067 https://github.com/microsoft/appcenter/issues/2067

JDK11 is installed by default.默认安装JDK11。 Just set environment variable JAVA_HOME to $(JAVA_HOME_11_X64).只需将环境变量 JAVA_HOME 设置为 $(JAVA_HOME_11_X64)。 Build config构建配置

暂无
暂无

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

相关问题 react-native博士中的JDK版本 - JDK version in react-native doctor AppCenter:在 Git 中构建 2 层深的 React-Native 项目 - AppCenter: build React-Native project which is 2 levels deep in Git React-native build error Android - java.lang.UnsupportedClassVersionError:com / android / build / gradle / AppPlugin:不支持的major.minor版本52.0 - React-native build error Android - java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0 升级到 react-native 版本 0.60.4 后 react-native run-android 出错 - Error with react-native run-android after upgrade to react-native version 0.60.4 React-Native 找不到JDK和android SDK反应原生 - React-Native Failed to find JDK and android SDK react native 我运行 react-native-doctor 时出现 JDK 错误,但我已经升级了 jdk 版本 - JDK error while i run react-native-doctor but i already upgrade jdk version React-Native 版本 0.60.3 中的版本不匹配 - Version Mismatch in React-Native Version 0.60.3 已安装 Ionic 构建工具但收到错误“未找到已安装的构建工具。安装 Android 构建工具版本 19.1.0 或更高版本。” - Ionic build tools installed but receiving error "No installed build tools found. Install the Android build tools version 19.1.0 or higher." Android Gradle 插件需要 Java 11 才能运行。 您目前正在使用 Java 1.8(react-native Android) - Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8(react-native Android) 反应导航与本机0.57不兼容吗? - Is react-navigation incompatible with react-native 0.57?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM