Android build with WebP and GIF support fails since RN 0.65 (jcenter depedency)
See original GitHub issuePlease provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html
When removing jcenter, the android build fails with the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.facebook.fresco:webpsupport:2.1.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- file:/Users/yonom/.m2/repository/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- file:/Users/yonom/GitHub/test/MyTestApp/node_modules/react-native/android/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- file:/Users/yonom/GitHub/test/MyTestApp/node_modules/jsc-android/dist/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- https://dl.google.com/dl/android/maven2/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- https://www.jitpack.io/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
Required by:
project :app
> Could not find com.facebook.fresco:webpsupport:2.1.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- file:/Users/yonom/.m2/repository/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- file:/Users/yonom/GitHub/test/MyTestApp/node_modules/react-native/android/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- file:/Users/yonom/GitHub/test/MyTestApp/node_modules/jsc-android/dist/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- https://dl.google.com/dl/android/maven2/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
- https://www.jitpack.io/com/facebook/fresco/webpsupport/2.1.0/webpsupport-2.1.0.pom
Required by:
project :app > com.facebook.fresco:animated-webp:2.1.0
> Could not find com.facebook.fresco:animated-drawable:2.1.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/facebook/fresco/animated-drawable/2.1.0/animated-drawable-2.1.0.pom
- file:/Users/yonom/.m2/repository/com/facebook/fresco/animated-drawable/2.1.0/animated-drawable-2.1.0.pom
- file:/Users/yonom/GitHub/test/MyTestApp/node_modules/react-native/android/com/facebook/fresco/animated-drawable/2.1.0/animated-drawable-2.1.0.pom
- file:/Users/yonom/GitHub/test/MyTestApp/node_modules/jsc-android/dist/com/facebook/fresco/animated-drawable/2.1.0/animated-drawable-2.1.0.pom
- https://dl.google.com/dl/android/maven2/com/facebook/fresco/animated-drawable/2.1.0/animated-drawable-2.1.0.pom
- https://www.jitpack.io/com/facebook/fresco/animated-drawable/2.1.0/animated-drawable-2.1.0.pom
Required by:
project :app > com.facebook.fresco:animated-gif:2.0.0 > com.facebook.fresco:animated-base:2.1.0
React Native version:
Run react-native info
in your terminal and copy the results here.
System:
OS: macOS 11.5.2
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 151.99 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.7.0 - /var/folders/4l/5q_1bbc93mb221kpmsz41jth0000gn/T/yarn--1629981704937-0.7811824049039413/node
Yarn: 1.22.11 - /var/folders/4l/5q_1bbc93mb221kpmsz41jth0000gn/T/yarn--1629981704937-0.7811824049039413/yarn
npm: 7.21.0 - /usr/local/bin/npm
Watchman: 2021.08.02.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 23, 24, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 31.0.0, 31.0.0, 31.0.0, 31.0.0
System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7621141
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_292 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: ^17.0.2 => 17.0.2
react-native: ^0.65.1 => 0.65.1
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- New project
npx react-native init
- add animated gif and webp support as per https://reactnative.dev/docs/image#gif-and-webp-support-on-android
- Build the app
yarn android
Expected Results
Describe what you expected to happen.
The build should compile successfully.
Snack, code example, screenshot, or link to a repository:
Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve
android/app/build.gradle
dependencies {
// For animated GIF support
implementation 'com.facebook.fresco:animated-gif:2.0.0'
// For WebP support, including animated WebP
implementation 'com.facebook.fresco:animated-webp:2.1.0'
implementation 'com.facebook.fresco:webpsupport:2.0.0'
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (2 by maintainers)
Top GitHub Comments
Update your fresco dependency to 2.5.0 in your app.gradle file your gif will work fine
The documentation has been upgraded to use 2.5.0, these new versions no longer cause issues.
Closing issue