【问题标题】:> Task :@react-native-firebase_messaging:compileDebugJavaWithJavac FAILED> 任务:@react-native-firebase_messaging:compileDebugJavaWithJavac FAILED
【发布时间】:2021-11-06 06:51:27
【问题描述】:

当我尝试使用这些命令 yarn run androidreact-native run-android 构建 android 时,我显示了此错误。请帮助mw解决这个错误。

这里是 package.json

  "@react-native-firebase/admob": "^11.5.0",
    "@react-native-firebase/app": "^11.5.0",
    "@react-native-firebase/messaging": "^11.5.0",

错误:

> Configure project :react-native-firebase_messaging
:react-native-firebase_messaging package.json found at /Users/apple/Desktop/xnd-react-native/node_modules/@react-native-firebase/messaging/package.json
:@react-native-firebase_app package.json found at /Users/apple/Desktop/xnd-react-native/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_messaging:firebase.bom using default value: 26.8.0
:react-native-firebase_messaging package.json found at /Users/apple/Desktop/xnd-react-native/node_modules/@react-native-firebase/messaging/package.json
:react-native-firebase_messaging:version set from package.json: 11.5.0 (11,5,0 - 11005000)
:react-native-firebase_messaging:android.compileSdk using custom value: 31
:react-native-firebase_messaging:android.targetSdk using custom value: 31
:react-native-firebase_messaging:android.minSdk using custom value: 21
:react-native-firebase_messaging:reactNativeAndroidDir /Users/apple/Desktop/xnd-react-native/node_modules/react-native/android

> Task :@react-native-firebase_messaging:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
17 actionable tasks: 1 executed, 16 up-to-date

【问题讨论】:

  • 自上个月以来我也面临同样的问题......有没有人找到任何解决方案??
  • @Sjonchhe 我找到了解决方案。更新jdk版本试试看(推荐jdk 11)
  • @vjtechno 你能说说你是如何更新jdk版本的吗?谢谢

标签: javascript android react-native react-native-firebase


【解决方案1】:

我在 jdk 8 中也有同样的问题。当我将 jdk 8 更改为 11 时,它对我有用。

【讨论】:

  • 怎么把jdk从8改成11?
  • 它不起作用
猜你喜欢
  • 2019-08-04
  • 1970-01-01
  • 1970-01-01
  • 2022-11-12
  • 2021-09-15
  • 2023-03-16
  • 2020-07-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多