0

I'm making a animated login screen using a gif, but it only animated on expo, when i build the apk the gif keep static.

    <ImageBackground source={require("./src/assets/DrawerIcons/back_login.gif")} style={styles.background} resizeMode="cover">
        <View style={styles.markWrap}>
          <Image source={mark} style={styles.mark} resizeMode="contain" />
        </View></ImageBackground>

2 Answers2

0

if the image is locally stored as I think it's you should use require('path/to/image.gif') and not uri property as you did

<ImageBackground source={require('./path/to/image')}>
....
</ImageBackground>
Louay Al-osh
  • 3,177
  • 15
  • 28
  • Sorry, my mistake, actually i use the require, but i copied the wrong code, i'll edit. The fact is, the code works in expo, but when i make the build show static – Leandro Nascimento Oct 25 '18 at 14:57
-1

you can see

On Android, build times dropped from about 12.5 minutes to 11 minutes (1.1x reduction) and the size of a basic APK dropped from 27MB to 19MB (1.4x reduction). On iOS, build times are the same due to how the builders work and the size of a basic IPA dropped by several hundred megabytes (IPAs contain bitcode and are much larger than the final apps downloaded from the App Store). Additionally, isolating SDK versions means changes to one SDK version are unlikely to affect standalone apps built with other SDK versions. Overall, we hope faster build times and increased isolation will improve the Expo developer experience.

https://blog.expo.io/expo-for-professionals-218b7937fafb