动画在android中的gif图像中不起作用
最佳答案
For react native version>=0.60 :
构建自己的原生代码时,Android 默认不支持 GIF 和 WebP。
您需要在
android/app/build.gradle
中添加一些可选模块,具体取决于您的应用程序的需求。implementation 'com.facebook.fresco:fresco:2.0.0'
implementation 'com.facebook.fresco:animated-gif:2.0.0'
For latest react native version 0.66 :
implementation 'com.facebook.fresco:animated-gif:2.6.0'
关于android - Gif 图像在 react 原生的 android 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50523233/