How to set canOverrideExistingModule=true in React Native for Android Apps?

前端 未结 12 1010
我寻月下人不归
我寻月下人不归 2020-12-23 18:53

I built an android app using React Native, it got built successfully but when I run the app in my Android Virtual Device it shows up a full red screen with the following err

12条回答
  •  萌比男神i
    2020-12-23 19:37

    Add only the modules which are not autolinked at here,

            @Override
            protected List getPackages() {
              @SuppressWarnings("UnnecessaryLocalVariable")
              List packages = new PackageList(this).getPackages();
              // Packages that cannot be autolinked yet can be added manually here, for 
              // example: packages.add(new MyReactNativePackage());         
              return packages;
            }
    
    

    If the module is autolinked and added the module here, you will get this error.

提交回复
热议问题