Skip to content

Commit

Permalink
fix error can't load .gif image
Browse files Browse the repository at this point in the history
  • Loading branch information
Le Linh committed May 22, 2018
1 parent 200bf93 commit 0a13ea2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,20 @@ dependencies {
compile project(':react-native-linear-gradient')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])

// If your app supports Android versions before Ice Cream Sandwich (API level 14)
compile 'com.facebook.fresco:animated-base-support:1.3.0'

// For animated GIF support
compile 'com.facebook.fresco:animated-gif:1.3.0'

// For WebP support, including animated WebP
compile 'com.facebook.fresco:animated-webp:1.3.0'
compile 'com.facebook.fresco:webpsupport:1.3.0'

// For WebP support, without animations
compile 'com.facebook.fresco:webpsupport:1.3.0'

compile "com.android.support:appcompat-v7:26.1.0"
compile "com.facebook.react:react-native:+" // From node_modules
}
Expand Down
4 changes: 4 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip

-keep class com.facebook.imagepipeline.animated.factory.AnimatedFactoryImpl {
public AnimatedFactoryImpl(com.facebook.imagepipeline.bitmaps.PlatformBitmapFactory, com.facebook.imagepipeline.core.ExecutorSupplier);
}

# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.proguard.annotations.DoNotStrip class *
-keep @com.facebook.common.internal.DoNotStrip class *
Expand Down

0 comments on commit 0a13ea2

Please sign in to comment.