如何在react-native应用程序中添加gif

问题描述 投票:0回答:2

如何在React Native中在背景中添加gif

如何在 React Native 中显示动画 gif。这是我尝试过的。

react-native android-animation animated-gif
2个回答
0
投票

您可以在此链接中找到此问题的完整答案:

[https://stackoverflow.com/questions/35594783/how-do-i-display-an-animated-gif-in-react-native][1]


0
投票

在 android/app/build.gradle 添加:

dependencies {
    // For animated GIF support
    implementation 'com.facebook.fresco:fresco:3.1.3'    
    implementation 'com.facebook.fresco:animated-gif:3.1.3'
    // your other
}

然后重新打开 Android Studio。

© www.soinside.com 2019 - 2024. All rights reserved.