'Invariant Violation: requireNativeComponent: "BVLinearGradient" was not found in the UIManager
the error above is shown in this import
import React from 'react';
import {
View,
Text,
TouchableOpacity,
Dimensions,
StyleSheet,
StatusBar,
Image
} from 'react-native';
import * as Animatable from 'react-native-animatable';
import LinearGradient from 'react-native-linear-gradient';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import { useTheme } from '@react-navigation/native';
this is the import statement bringing the error
Solution 1:[1]
Try:
For iOS
cd ios
pod install
- rebuild project
For Android:
- Uninstall application in Android emulator
cd Android
./gradlew clean && ./gradlew cleanBuildCache
npm run android
Solution 2:[2]
It worked but first, I need to upgrade my Java version. Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jeremy Caney |
Solution 2 | Skatox |