1

I am using React Navigation with Drawer. It keeps showing the alert "If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation" and that's why I need to install Reanimated 2.

The problem is that I use Realm SDK to connect my app to MongoDB Atlas and when I configure Reanimated 2 according to the steps on the site the app just doesn't load and doesn't show any errors in Metro Bundler.

If I remove Realm the program opens normal and without the Reanimated 2 alert. If I revert the configuration of the Reanimated 2 the program opens, but the alert persists "If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation".

Another thing, when Realm is installed I always get the following alert when running react-native run-android: “Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.”.

Bruno
  • 63
  • 4
  • I have seen this issue reported in multiple places. Downgrading to Reanimated v1 may be necessary until this is fixed in Realm or Reanimated 2. – ChrisW Jul 29 '21 at 16:04
  • And if I leave the package installed with the React Navigation dependencies, in the case react-native-reanimated ??? Despite the warning "If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation", the React Navigation appears to function normally. – Bruno Jul 29 '21 at 21:49
  • well, the error/warning message makes little sense as the linked url does not exist. Others suggested to disable it with LogBox. - I have an App with Realm running right now without errors on Android with the following: realm 10.6.1, react-native-reanimated 2.2.0, react-native 0.63.4, @react-navigation/native 5.9.4 built on Expo (42.0.1) bare workflow. You could test, if the error is version dependant by setting up a sample app. - It could also be caused by remote debugging. Try Flipper instead; discussed here: https://github.com/software-mansion/react-native-reanimated/discussions/1978 – ChrisW Jul 30 '21 at 13:05
  • Hi @ChrisW. The url http://https://docs.swmansion.com/react-native-reanimated/docs/installation/ exists. I use the React Native Cli. If I just install and use react navigation, with its dependencies (react-native-reanimated 2.2.0 included) and use for example Stack navigation I don't get the alert that mentioned "If you want to use Reanimated 2...", but if I install and use the drawer navigation the alert appears, do the test there if you can. I use realm 10.6.1, react-native 0.64.2, @react-navigation/native 5.9.4 built on React Native Cli. – Bruno Jul 30 '21 at 14:24
  • I also use drawer navigation, which does not cause a problem in my app. It may not be that easy to reproduce. Hermes used to be the main issue previously, but if you do not use Hermes it must be something else. There are multiple reports of issues during the last few months with various ideas: https://github.com/search?q=Reanimated+realm&type=issues - (By the way both links in the first post do not work, but thats not the issue anyways.) Take a look at the `useLegacyImplementation` setting: https://reactnavigation.org/docs/6.x/drawer-navigator/#uselegacyimplementation – ChrisW Jul 30 '21 at 17:45
  • @ChrisW Suddenly you don't get the alert for using Expo, I use React Native CLI. – Bruno Jul 30 '21 at 19:44
  • Well I am using Expo Bare Workflow, because I was using react-native-web to test a web version of my app. Apart from that I am not using any Expo specific features. Expo Bare Workflow is actually very similar to React Native CLI. I never had any Expo specific warnings or errors due to Realm. – ChrisW Jul 31 '21 at 06:14

0 Answers0