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

前端 未结 12 913
我寻月下人不归
我寻月下人不归 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条回答
  •  有刺的猬
    2020-12-23 19:37

    Go to the MainAplication file.

    Remove duplicate package and remove duplicate package in getPackages() method

      @Override
        protected List getPackages() {
          return Arrays.asList(
              new MainReactPackage(),
                new VectorIconsPackage()
          );
        }
    

    Then after try this command in your terminal :

    • cd android
    • ./gradlew clean

提交回复
热议问题