Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not determine the dependencies of null. > Could not resolve all task dependencies for configuration ':classpath'. > Could not find com.facebook.react:react-native-vector-icons:10.0.3. #43490

Closed
ElizabethSobiya opened this issue Mar 14, 2024 · 8 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@ElizabethSobiya
Copy link

ElizabethSobiya commented Mar 14, 2024

Description

While converting from react expo project to react cli, I created new react native cli and copied the src code from expo to cli, while running the code using npx react-native run-android , I got the the below error,

Steps to reproduce

android/app/build.gradle file code

apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

/**
 * This is the configuration block to customize your React Native Android app.
 * By default you don't need to apply any configuration, just uncomment the lines you need.
 */
react {
    /* Folders */
    //   The root of your project, i.e. where "package.json" lives. Default is '..'
    // root = file("../")
    //   The folder where the react-native NPM package is. Default is ../node_modules/react-native
    // reactNativeDir = file("../node_modules/react-native")
    //   The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
    // codegenDir = file("../node_modules/@react-native/codegen")
    //   The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
    // cliFile = file("../node_modules/react-native/cli.js")

    /* Variants */
    //   The list of variants to that are debuggable. For those we're going to
    //   skip the bundling of the JS bundle and the assets. By default is just 'debug'.
    //   If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
    // debuggableVariants = ["liteDebug", "prodDebug"]

    /* Bundling */
    //   A list containing the node command and its flags. Default is just 'node'.
    // nodeExecutableAndArgs = ["node"]
    //
    //   The command to run when bundling. By default is 'bundle'
    // bundleCommand = "ram-bundle"
    //
    //   The path to the CLI configuration file. Default is empty.
    // bundleConfig = file(../rn-cli.config.js)
    //
    //   The name of the generated asset file containing your JS bundle
    // bundleAssetName = "MyApplication.android.bundle"
    //
    //   The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
    // entryFile = file("../js/MyApplication.android.js")
    //
    //   A list of extra flags to pass to the 'bundle' commands.
    //   See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
    // extraPackagerArgs = []

    /* Hermes Commands */
    //   The hermes compiler command to run. By default it is 'hermesc'
    // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
    //
    //   The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
    // hermesFlags = ["-O", "-output-source-map"]
}

/**
 * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
 */
def enableProguardInReleaseBuilds = false

/**
 * The preferred build flavor of JavaScriptCore (JSC)
 *
 * For example, to use the international variant, you can use:
 * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
 *
 * The international variant includes ICU i18n library and necessary data
 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
 * give correct results when using with locales other than en-US. Note that
 * this variant is about 6MiB larger per architecture than default.
 */
def jscFlavor = 'org.webkit:android-jsc:+'

android {
    ndkVersion rootProject.ext.ndkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    compileSdk rootProject.ext.compileSdkVersion

    namespace "com.vivmart.customer"
    defaultConfig {
        applicationId "com.vivmart.customer"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
    }
    signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://reactnative.dev/docs/signed-apk-android.
            signingConfig signingConfigs.debug
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
}

dependencies {
    // The version of react-native is set by the React Native Gradle Plugin
    implementation("com.facebook.react:react-android")
    implementation("com.facebook.react:flipper-integration")

    if (hermesEnabled.toBoolean()) {
        implementation("com.facebook.react:hermes-android")
    } else {
        implementation jscFlavor
    }
}

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

React Native Version

0.73.6

Affected Platforms

Runtime - Android

Output of npx react-native info

/build.gradle

buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        minSdkVersion = 21
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "25.1.8937393"
        kotlinVersion = "1.8.0"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
        classpath ("com.facebook.react:react-native-vector-icons:10.0.3")
        classpath ("com.facebook.react:react-native-linear-gradient:2.8.3")
        classpath ("com.facebook.react:react-native-gesture-handler:2.15.0")

    }
}

apply plugin: "com.facebook.react.rootproject"

Stacktrace or Logs

% npx react-native run-android
(node:24199) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info A dev server is already running for this project on port 8081.
info Installing the app...

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
5 actionable tasks: 5 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not find com.facebook.react:react-native-vector-icons:10.0.3.
     Required by:
         project :app
   > Could not find com.facebook.react:react-native-linear-gradient:2.8.3.
     Required by:
         project :app
   > Could not find com.facebook.react:react-native-gesture-handler:2.15.0.
     Required by:
         project :app

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 9s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. > Could not find com.facebook.react:react-native-vector-icons:10.0.3. Required by: project :app > Could not find com.facebook.react:react-native-linear-gradient:2.8.3. Required by: project :app > Could not find com.facebook.react:react-native-gesture-handler:2.15.0. Required by: project :app * Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 9s.
info Run CLI with --verbose flag for more details.
% clear                       
% npx react-native run-android
(node:24399) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info A dev server is already running for this project on port 8081.
info Installing the app...

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'vivimart'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not find com.facebook.react:react-native-vector-icons:10.0.3.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom
        Required by:
            project :
      > Could not find com.facebook.react:react-native-linear-gradient:2.8.3.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom
        Required by:
            project :
      > Could not find com.facebook.react:react-native-gesture-handler:2.15.0.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom
        Required by:
            project :

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 5s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
A problem occurred configuring root project 'vivimart'.
> Could not determine the dependencies of null. > Could not resolve all task dependencies for configuration ':classpath'. > Could not find com.facebook.react:react-native-vector-icons:10.0.3. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom Required by: project : > Could not find com.facebook.react:react-native-linear-gradient:2.8.3. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom Required by: project : > Could not find com.facebook.react:react-native-gesture-handler:2.15.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom Required by: project : * Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 5s.
info Run CLI with --verbose flag for more details.
 % clear                       
 npx react-native run-android
(node:24498) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info A dev server is already running for this project on port 8081.
info Installing the app...

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'vivimart'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not find com.facebook.react:react-native-vector-icons:10.0.3.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom
        Required by:
            project :
      > Could not find com.facebook.react:react-native-linear-gradient:2.8.3.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom
        Required by:
            project :
      > Could not find com.facebook.react:react-native-gesture-handler:2.15.0.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom
        Required by:
            project :

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 3s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
A problem occurred configuring root project 'vivimart'.
> Could not determine the dependencies of null. > Could not resolve all task dependencies for configuration ':classpath'. > Could not find com.facebook.react:react-native-vector-icons:10.0.3. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom Required by: project : > Could not find com.facebook.react:react-native-linear-gradient:2.8.3. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom Required by: project : > Could not find com.facebook.react:react-native-gesture-handler:2.15.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom Required by: project : * Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 3s.
info Run CLI with --verbose flag for more details.
% clear                       
% npx react-native run-android
(node:24761) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info A dev server is already running for this project on port 8081.
info Installing the app...

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'vivimart'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not find com.facebook.react:react-native-vector-icons:10.0.3.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom
        Required by:
            project :
      > Could not find com.facebook.react:react-native-linear-gradient:2.8.3.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom
        Required by:
            project :
      > Could not find com.facebook.react:react-native-gesture-handler:2.15.0.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom
          - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom
        Required by:
            project :

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 4s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
A problem occurred configuring root project ''.
> Could not determine the dependencies of null. > Could not resolve all task dependencies for configuration ':classpath'. > Could not find com.facebook.react:react-native-vector-icons:10.0.3. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-vector-icons/10.0.3/react-native-vector-icons-10.0.3.pom Required by: project : > Could not find com.facebook.react:react-native-linear-gradient:2.8.3. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-linear-gradient/2.8.3/react-native-linear-gradient-2.8.3.pom Required by: project : > Could not find com.facebook.react:react-native-gesture-handler:2.15.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom - https://repo.maven.apache.org/maven2/com/facebook/react/react-native-gesture-handler/2.15.0/react-native-gesture-handler-2.15.0.pom Required by: project : * Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 4s.
info Run CLI with --verbose flag for more details.

Reproducer

https://github.com/ElizabethSobiya

Screenshots and Videos

No response

@github-actions github-actions bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Mar 14, 2024
@ElizabethSobiya
Copy link
Author

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Mar 14, 2024
@cortinico
Copy link
Contributor

ElizabethSobiya/react_native_user_app

This reproducer is the empty one. Can you fill it so that it reproduces your failure? @ElizabethSobiya

@cortinico cortinico added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 🔍 Needs: Attention Issues where the author has responded to feedback. labels Mar 14, 2024
Copy link

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

@ElizabethSobiya
Copy link
Author

Can you check now ?

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 14, 2024
@cortinico
Copy link
Contributor

@ElizabethSobiya the link to the reproducer is still invalid

@cortinico cortinico added Needs: Author Feedback and removed Needs: Attention Issues where the author has responded to feedback. labels Mar 15, 2024
Copy link

github-actions bot commented Apr 9, 2024

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 9, 2024
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

Copy link

This issue was closed because the author hasn't provided the requested feedback after 7 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants