0

I am using Lottie and lottie uses react-native-linear-gradient as a dependancy. Now the problem is that I need to use react-native-linear-gradient, If I use it via npm install (as another package). I get the error, tried to register two view with same BVLinearGradient Is there any way through which I can use The linear gradient as well as lottie? or maybe i could use react-natve-linear-gradient through lottie somehow?

Sarmad Shah
  • 3,725
  • 1
  • 20
  • 42

1 Answers1

1

I had both on my project, but I installed linear-gradient then Lottie and found no issue.

You can try it.

this is my MainApplication

@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
        new LottiePackage(),
        new LinearGradientPackage(),
        new PickerViewPackage(),
        new SnackbarPackage(),
        new Sha256Package(),
        new FIRMessagingPackage(),
        new ReactNativeContacts(),
        new RNSpinkitPackage(),
        new ReactNativeLocalizationPackage(),
        new BlurViewPackage(),
        new VectorIconsPackage(),
        new ReactNativeConfigPackage(),
        new RCTCameraPackage(),
        new TlvInterpreterPackage(),
        new TlvGeneratorPackage()
  );
}
Bruno Mazzardo
  • 1,586
  • 1
  • 15
  • 27