gpt4 book ai didi

android - react native 手势处理程序构建失败

转载 作者:行者123 更新时间:2023-11-29 02:19:51 24 4
gpt4 key购买 nike

正如我在上一个问题中所解释的,我是 React-Native 世界的新手。我正在开发一个应用程序只是为了证明我的技能,一切似乎都很好,但今天我试图处理 react 导航。所以我遵循了各个步骤(https://reactnavigation.org/docs/en/getting-started.html):

  1. React-navigation 安装:npm install --save react-navigation

  2. 手势处理程序安装:npm install --save react-native-gesture-handler

  3. MainActivity.java 的修改。

无论如何,当我尝试使用命令 react-native run-android 安装应用程序时我收到此错误: enter image description here

附言我之前已经遇到过 react-navigation 的问题,所以我决定遵循人们在 StackOverflow 中发布的许多建议,我尝试卸载并重新安装 react-navigation,然后链接模块……等。但我想我让事情变得更糟了。 React 版本为 0.60。解决方案?提前谢谢你

最佳答案

我已经让它在我的项目中运行了,你可以使用这些命令让它运行,然后等待维护者的发布:

1) npm install --save-dev jetifier
2) npx jetify
3) npx react-native run-android
4) npx jetify

请注意,在他们更新库之前,这是一种解决方法。

关于android - react native 手势处理程序构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56976217/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com