DEV Community

loading...

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

Collapse
gautham495 profile image
Gautham Vijayan

You sir a legend!!

Collapse
gautham495 profile image
Gautham Vijayan

You saved me as google play store is saying "App package name already exists" and I have to do all the steps mentioned here!!

Thanks a lot!

Collapse
karanpratapsingh profile image
Thread Thread
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.