这是我的Modal组件
export default function LoadingModal(props) {
const {visible} = props;
return (
<Modal transparent visible={visible}>
<View style={styles.modalView}>
<Image
style={styles.loadingGif}
source={require('../../asset/images/loading.gif')}
/>
</View>
</Modal>
);
}除了GIF没有动画外,一切都在工作。
对于RN0.65,我遵循反应本机组件并添加
// For animated GIF support
implementation 'com.facebook.fresco:fresco:2.0.0'
implementation 'com.facebook.fresco:animated-gif:2.0.0'进入android/app/build.gradle的dependencies部分,但仍然不起作用,
cd android
./gradlew clean
cd ..
react-native run-android ( yarn android )也不起作用。
我一点也不知道。所以我希望任何人都能帮我解决这个问题。非常感谢。
发布于 2022-02-17 01:47:12
I固定
只需使用implementation 'com.facebook.fresco:animated-gif:2.5.0'
https://stackoverflow.com/questions/69477588
复制相似问题