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?
Asked
Active
Viewed 469 times
0

Sarmad Shah
- 3,725
- 1
- 20
- 42
-
I had both on my project, but I installed linear-gradient then Lottie and found no issue – Bruno Mazzardo Jun 05 '18 at 15:51
-
Sorry...it didn't work as expected my bad....i still upvoted you Thank you – Sarmad Shah Jun 05 '18 at 16:14
-
can you check on your java files to see if you don't request linear twice? – Bruno Mazzardo Jun 05 '18 at 16:16
-
might be related https://stackoverflow.com/questions/46613149/tried-to-register-two-views-with-the-same-name-progressbarandroid – Bruno Mazzardo Jun 05 '18 at 16:19
-
i am debugging in ios – Sarmad Shah Jun 05 '18 at 16:26
-
take a look at this issue https://github.com/react-native-community/react-native-linear-gradient/issues/230 – Bruno Mazzardo Jun 05 '18 at 16:28
1 Answers
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