1

I've upgraded react-native to latest version (0.68) through react-native CLI, and now every time I'm trying to build for android I get this error: error: cannot find symbol reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);

I tried to clean the bundle, made sure my package name is correct (like others issues suggested) and nothing so far..

MasterPiece
  • 445
  • 7
  • 13
  • 1
    This may help https://github.com/facebook/react-native/issues/33623#issuecomment-1189146110 – YohanK Mar 25 '23 at 16:19

3 Answers3

4

If you're using the latest version of React Native (i.e: v >= 68), you've to rebuild your projects. it works for me.

Md. Jamal Uddin
  • 754
  • 8
  • 17
1

Inside your .env file add those keys and then give them boolean values, like the following:

IS_NEW_ARCHITECTURE_ENABLED=false
IS_HERMES_ENABLED=true
AmerllicA
  • 29,059
  • 15
  • 130
  • 154
0

Going through react-native migrations file, I've found out that somehow I missed a few migrations related to react-native new architecture (although I would expect it to be automatic when using react-native CLI upgrade command).

I suggest to follow the migrations changes especially on MainActivity.java and MainApplication.java - don't forget to change the "from" and "to" versions to your case:

https://react-native-community.github.io/upgrade-helper/?from=0.65.1&to=0.68.1

MasterPiece
  • 445
  • 7
  • 13