DEV Community

Discussion on: Quick guide for updating package name in React Native

 
gautham495 profile image
Gautham Vijayan

Please add two more things here.

  1. For Splash Screen we have to change the name from old to new.
  2. And in MainApplication.java we have to change package name at class as shown below.
 private static void initializeFlipper(
      Context context, ReactInstanceManager reactInstanceManager) {
    if (BuildConfig.DEBUG) {
      try {
        /*
         We use reflection here to pick up the class that initializes Flipper,
        since Flipper library is not available in release mode
        */

        Class<?> aClass = 
Class.forName("com.<New_Package_name>.ReactNativeFlipper");


        aClass
            .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
            .invoke(null, context, reactInstanceManager);
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
gautham495 profile image
Gautham Vijayan

I ran into errors because of these ones.