0

ERROR:native-navigation' has variant 'reactNative51Debug' selected, but the module ''app'' depends on variant 'reactNative57Debug'.

I get the above error while setting RNN2 in android. I am using react-native version 0.59.3.

Akhil S
  • 145
  • 14

1 Answers1

0

I had a similar issue and after going through several threads and answers I had to downgrade my RN from 0.59 to 0.57 to make it work. If downgrading is an option for you, you can do it like this:

  • Open the file of your project named as package.json

  • inside it you can find react-native": "0.56.4" replace this version with react-native": "0.55.4" or what ever the version you want

  • Inside your project directory and run the command npm-install

  • after installation check the version of react-native by running the command react-native --version and make sure that version is which you changed in package.json

  • restart your project and you are ready to go

3iL
  • 2,146
  • 2
  • 23
  • 47