android - Gif 图像在 react 原生的 android 中不起作用

标签 android react-native

动画在android中的gif图像中不起作用

Android gif image without animation

最佳答案

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/

相关文章:

text - React Native 中文本行之间的间距

javascript - 如何从java返回数据到javascript?

android - 错误 :Failed to resolve: com. google.firebase :firebase-core:11. 0.0

android - 无法下载未知扩展

java - Android方向改变异常

react-native - 如何在 React-Native 中设置 DrawerNavigator 的背景图像?

javascript - 从第二次获取结果

android - 有什么方法可以获取用于在 android 中进行 Junit 测试的 Actionbar 项目的引用?

java - 当我平移 map 时,Google map 叠加层不会移动

iOS navite 框架 View 推送不适用于 react-native 应用程序