【问题标题】:React-Native-Gesture-Handler failed during code execution on AndroidReact-Native-Gesture-Handler 在 Android 上执行代码期间失败
【发布时间】:2019-11-16 12:08:01
【问题描述】:

我正在尝试为我的项目使用 react-native-navigation 库,但为了使用它,我需要手势处理程序。我安装它并编辑 MainActivity.jar,正如它在 react-navigation 和 react-native-gesture-handler 网站上所说的那样。但是,每当我尝试使用“react-native start”和“react-native run-android”运行我的代码时,它都会尝试编译所有内容,但随后失败并给我这个错误消息:

 > Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED

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.4.1/userguide/command_line_interface.html#sec:command_line_warnings
20 actionable tasks: 20 executed

有人可以帮帮我吗?

【问题讨论】:

    标签: react-native


    【解决方案1】:

    在我的 MacOS 中,找不到确切的 Java SDK Home 请关注此link 来解决您的问题

    【讨论】:

      【解决方案2】:

      npm i jetifier npx jetify

      在 rn 0.6 上为我修复了它

      https://github.com/kmagiera/react-native-gesture-handler/issues/647#issuecomment-508459010

      【讨论】:

      • 在我尝试使用react-native run-android 后,它显示它成功完成了构建但没有运行应用程序,如果我尝试手动启动它也不会启动..?
      • react-native run-android 为你开地铁吗?
      • 不,但我自己打开一个。我还重新安装了 npm 模块并以某种方式修复了它
      • 如果它修好了!但如果你的地铁没有自动运行,你应该先运行npm start,然后在一个新的终端运行react-native run-android,一切正常。
      猜你喜欢
      • 2019-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-03
      • 1970-01-01
      • 2019-12-28
      • 2022-06-27
      • 1970-01-01
      相关资源
      最近更新 更多