我已经添加了
compile 'com.facebook.fresco:fresco:1.3.0'
compile 'com.facebook.fresco:animated-gif:1.3.0'
compile 'com.facebook.fresco:animated-base-support:1.3.0'在我的build.gradle文件中
-keep class com.facebook.imagepipeline.animated.factory.AnimatedFactoryImpl {
public AnimatedFactoryImpl(com.facebook.imagepipeline.bitmaps.PlatformBitmapFactory, com.facebook.imagepipeline.core.ExecutorSupplier);
}在我的proguard-rules.pro文件中。但是,我的gif不是在应用程序中自动播放。我使用的是RN版本0.51。我可能会错的地方有什么帮助吗?
发布于 2018-12-24 16:17:04
试试这个:你需要给图像提供一个宽度和高度,宽度:未定义,高度:未定义也不起作用。
<Image source={require('./img/fireworks.gif')} style={{flex: 1, width: 100, height: 100}} />https://stackoverflow.com/questions/49377390
复制相似问题