'Error TypeError: null is not an object (evaluating 'safeGetViewManagerConfig('LottieAnimationView').Commands')
React Native use lottie-react-native
My code
import React from 'react'; import { SafeAreaView, StyleSheet, View, Text, } from 'react-native'; import LottieView from 'lottie-react-native';
export default class BasicExample extends React.Component { render() { return (
<View style={{flex: 1, backgroundColor: 'yellow'}}>
<LottieView
style={{flex: 1}}
source={require("../assets/earthlottie.json")}
autoPlay
loop
/>
</View>
);
}
}
Version
"lottie-react-native": "^3.5.0", "react": "16.13.1", "react-native": "0.63.2"
Solution 1:[1]
Run this command react-native link and it will work. And still App crash try refer link https://github.com/react-native-community/lottie-react-native#readme
And set manual import for Android and IOS
Solution 2:[2]
I just ran npm link and that did it for me
Solution 3:[3]
With zsh:
for f ( *.mp4(.Lk+500000) ) mp4box -splits 500000 $f
Glob qualifiers: (.) to match plain files, (Lk+500000) to match files greater than 500000 KB in size. Add (D) to the qualifiers to include dotfiles.
Solution 4:[4]
You can perhaps use find, e.g.:
for file in $( find . -size +500M )
do
echo $file
done
But I don't know if find is available with macos.
Solution 5:[5]
You can use stat to obtain the file size in the loop:
stat -c '%s' filename.txt
note: The size is in bytes.
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 | darshan shrirang |
| Solution 2 | Alex Skotner |
| Solution 3 | |
| Solution 4 | oheil |
| Solution 5 | Doncho Gunchev |
