Could not find com.facebook.fresco.stetho

See original GitHub issue

Description

* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.facebook.fresco:stetho:2.2.0.
     Searched in the following locations:
       - file:/C:/Users/roger/.m2/repository/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom
       - file:/F:/Projects/my_takeouts/client/mobile/marketplace/node_modules/react-native/android/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom
       - file:/F:/Projects/my_takeouts/client/mobile/marketplace/node_modules/jsc-android/dist/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom
       - https://dl.google.com/dl/android/maven2/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom
       - https://repo.maven.apache.org/maven2/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom
       - https://www.jitpack.io/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom
     Required by:
         project :app > com.facebook.flipper:flipper-fresco-plugin:0.75.1

This only happens when I use mavenCentral in android/build.gradle. Using jcenter is fine. But jcenter is gonna be removed soon.

https://github.com/facebook/flipper/issues/2410

Version

0.66.4

Output of npx react-native info

System:
    OS: Windows 10 10.0.19042
    CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor
    Memory: 10.96 GB / 31.93 GB
  Binaries:
    Node: 14.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: Version  4.1.0.0 AI-201.8743.12.41.7042882
    Visual Studio: 15.9.28307.1401 (Visual Studio Community 2017)
  Languages:
    Java: 17.0.1
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^17.0.2 => 17.0.2
    react-native: ^0.66.4 => 0.66.4
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. Use mavenCentral in android/build.gradle
  2. Run app in development

Snack, code example, screenshot, or link to a repository

android/build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        minSdkVersion = 23
        compileSdkVersion = 31
        targetSdkVersion = 31
        ndkVersion = "20.1.5948944"
        googlePlayServicesVersion = "17.0.0"
        kotlinVersion = "1.5.20"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:7.0.0")
        classpath 'com.google.gms:google-services:4.3.8'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        mavenCentral()
        maven { url 'https://www.jitpack.io' }
    }
}

android/app.build.gradle (omitted some code)

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "androidx.core:core-splashscreen:1.0.0-alpha02"
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
      exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }

    implementation platform('com.google.firebase:firebase-bom:28.2.1')
    implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
    implementation 'com.facebook.android:facebook-share:[5,6)'
    implementation 'com.android.support:multidex:2.0.1'

    implementation 'com.google.android.gms:play-services-wallet:19.0.1'
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.implementation
    into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

35reactions
cortinicocommented, Jan 24, 2022

What you’re experiencing is caused by having a FLIPPER_VERSION=0.75.1 somewhere inside a gradle.proprties inside your project. That Flipper version is really old and you should instead use at least 0.99.0 which is the correct version to use with 0.66.4:

https://github.com/facebook/react-native/blob/1b31d6bb582768ccbe92d3c1a9e43354a8c531e5/template/android/gradle.properties#L28

4reactions
sapramitcommented, Jan 28, 2022

Anyone still facing the same issue as it not working for me as well even with FLIPPER_VERSION=0.99.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find com.facebook.fresco:stetho:2.2.0 getting this ...
Could not find com.facebook.fresco:stetho :2.2.0 getting this error while running a newly created app. I'm totally struck at this issue.
Read more >
stetho » 2.2.0 - com.facebook.fresco - Maven Repository
Facebook Stetho » 2.2.0. Fresco plugin for Stetho ... HomePage, https://github.com/facebook/fresco. Date, Mar 26, 2020 ... Compile Dependencies (0) ...
Read more >
Docs›Getting Started - Fresco
This Guide will walk you through the steps needed to start using Fresco in your app, including loading your first image.
Read more >
flipper-fresco-plugin : 0.76.0 - Maven Central Repository Search
Flipper Fresco Plugin - Images plugin for Flipper. ... Source code, https://github.com/facebook/flipper.git. Developers. facebook ...
Read more >
Webview not working when we updated smack to 4.4.4
After searching on different platforms we didn't find any help ... IllegalStateException: Could not parse Smack configuration file at iv.c0.
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