question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android build with WebP and GIF support fails since RN 0.65 (jcenter depedency)

See original GitHub issue

Please 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.

  1. New project npx react-native init
  2. add animated gif and webp support as per https://reactnative.dev/docs/image#gif-and-webp-support-on-android
  3. 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:closed
  • Created 2 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
sallarahmedcommented, Sep 1, 2021

Update your fresco dependency to 2.5.0 in your app.gradle file your gif will work fine

4reactions
Yonomcommented, Nov 2, 2021

The documentation has been upgraded to use 2.5.0, these new versions no longer cause issues.

Closing issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Native error when running with react-native run-android
I tried to change react-native version or edit build.gradle moving google() or jcenter(), but the error still persist. Can someone help me?
Read more >
React Native Upgrade Helper
React Native 0.62 includes built-in integration with Flipper. ... Check out Upgrade Support if you are experiencing issues related to React Native during ......
Read more >
Fresco Play Gif From File - ADocLib
For animated GIF support add following line on android/app/build.gradle ... Android build with WebP and GIF support fails since RN 0.65 jcenter depedency....
Read more >
project :app > id.zelory:compressor:2.1.0 - You.com | The AI ...
This dependency is that unresolved :unspecified: that fails your build. ... build with WebP and GIF support fails since RN 0.65 (jcenter depedency)#32091....
Read more >
Gradle build after JCenter shutdown - Microsoft Learn
If you use JCenter and Bintray resources in your AppCenter Android builds and your builds fail on Gradle Task failure (could not get ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found