4

I'm trying to use the react-native-navigation library for my project but in order to use it I need the gesture handler. I install it and edit the MainActivity.jar as it says on the website for react-navigation and react-native-gesture-handler. But whenever I try and run my code using "react-native start" and "react-native run-android" it tries and compiles everything but then fails and gives me this error message:

 > 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

Can someone help me please?

Blade
  • 190
  • 4
  • 12

2 Answers2

2

npm i jetifier npx jetify

fixed it for me on rn 0.6

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

Reza Shoja
  • 887
  • 2
  • 11
  • 24
  • After i try to use `react-native run-android` it shows that it completed the build successfully but doesn't run the app, and if i try to launch it manually it doesn't launch either..? – Blade Jul 09 '19 at 14:58
  • does `react-native run-android` open a metro for you? – Reza Shoja Jul 09 '19 at 19:10
  • No but I open one on my own. Also I reinstalled npm modules and that fixed it somehow – Blade Jul 09 '19 at 19:12
  • if it's got fixed great! but if your metro didn't run automatically you should first run `npm start` then in a new terminal run `react-native run-android` and everything works well. – Reza Shoja Jul 09 '19 at 19:47
2

In my MacOS, it can't not find exactly Java SDK Home Please follow this link to fix your issue

Cong Dan Luong
  • 1,577
  • 17
  • 15