Skip to content

Commit

Permalink
docs: Add troubleshooting page for "GIFs Are Not Playing on Android"
Browse files Browse the repository at this point in the history
  • Loading branch information
ALexanderLonsky committed Nov 12, 2024
1 parent b91189c commit 7fe466e
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,53 @@ cd android && ./gradlew generateCodegenArtifactsFromSchema

### Troubleshooting

#### Why do I get iOS linker errors
This [StackOverflow thread](https://stackoverflow.com/questions/52536380/why-linker-link-static-libraries-with-errors-ios)
may be helpful if you experience issues linking your iOS project.

Feel free to open an [issue](https://github.com/Giphy/giphy-react-native-sdk/issues) here in this repo if you run into
any problems.
#### GIFs Are Not Playing on Android
If you encounter an issue where GIFs appear as static images instead of animating, this may be due to a dependency conflict between
React Native and the Fresco library used by our SDK.

By default, our SDK references our Android SDK, which uses Fresco version 2.5.0. However, as of React Native 0.73.0,
the default Fresco version is 3.1.3.

Developers using our SDK with React Native versions from 0.73 up to but not including 0.76 can resolve this conflict
by adding the following block to the `android/build.gradle` file in the `:app module`,
right before the `dependencies` section:

```gradle
configurations.all {
resolutionStrategy {
forcedModules = ['com.giphy.sdk:ui:2.3.13']
}
}
```

For React Native 0.76.0 and above, where Fresco defaults to version 3.2.0, use the following configuration to ensure compatibility.
**Please check the exact version of Fresco used by the specific React Native version you are working with**, as this may vary.
Add this block to the same `android/build.gradle(:app)` file right before `dependencies`:

```gradle
configurations.configureEach {
resolutionStrategy {
forcedModules = [
'com.facebook.fresco:fresco:3.2.0',
'com.facebook.fresco:animated-gif:3.2.0',
'com.facebook.fresco:animated-base:3.2.0',
'com.facebook.fresco:animated-drawable:3.2.0',
'com.facebook.fresco:animated-webp:3.2.0',
'com.facebook.fresco:webpsupport:3.2.0',
'com.facebook.fresco:imagepipeline-okhttp3:3.2.0',
'com.facebook.fresco:middleware:3.2.0',
'com.facebook.fresco:nativeimagetranscoder:3.2.0'
]
}
}
```


#### Feel free to open an [issue](https://github.com/Giphy/giphy-react-native-sdk/issues) here in this repo if you run into any problems.

### Basic Usage

Expand Down

0 comments on commit 7fe466e

Please sign in to comment.