react-native - 任务:react-native-screens:compileDebugJavaWithJavac FAILED
问题描述
我使用反应导航v5 ..安装了所有依赖项..现在我遇到了错误..失败:构建失败并出现异常。
* What went wrong:
Execution failed for task ':react-native-screens:compileDebugJavaWithJavac'.
> java.lang.reflect.UndeclaredThrowableException
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
解决方案
我认为这个问题在 GitHub 问题上仍然存在 ->查看
如果你的 React Native Version < 0.60 那么你可以使用 Jetifier 来解决这个问题
yarn add --dev jetify
- 然后在你的 package.json 脚本中添加:
"postinstall": "jetify"
- 纱线喷射
如果你的 React Native 版本 0.60 > 那么试试这个
cd android && ./gradlew clean
推荐阅读
- contour - “棋盘”中正方形的对象边界检测
- mysql - MySQL 触发器在新的价目表变为活动状态后将产品价格状态更改为非活动状态
- reactjs - 如何修复 Firebase 9.0 无效的 API 密钥
- c# - 从 CollectionView 中删除/移除项目
- java - 如何正确评估java中的后缀符号?
- javascript - 将类组件转换为函数组件
- ida - IDA pro解析一个指向字符串的指针,如何恢复?
- reactjs - React 是如何实现 useEffect 和 useLayoutEffect 的?
- php - Woocommerce 隐藏所有客户的后付款
- python - 如何基于现有镜像创建新的 docker 镜像,但包含更多 Python 包?