Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not determine the dependencies of task ':app:mergeDebugAssets'

When I run react-native run-android on my project,I get an build error of gradle. I already uninstalled react-native-ftp with npm uninstall --save react-native-ftp, removed that dependency of node_modules, clear ./gradle cached files. But the error continuous..

In my environment windows this project works normally.

What's happing?

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve project :react-native-ftp.
     Required by:
         project :app
      > Unable to find a matching configuration of project :react-native-ftp:
          - None of the consumable configurations have attributes.

* 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 2s

    at makeError (/home/leroto/leroto-workspace/svm/frontend/node_modules/execa/index.js:174:9)
    at /home/leroto/leroto-workspace/svm/frontend/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async runOnAllDevices (/home/leroto/leroto-workspace/svm/frontend/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
    at async Command.handleAction (/home/leroto/leroto-workspace/svm/frontend/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:186:9)

like image 364
Leonardo Torres Avatar asked Jun 14 '20 22:06

Leonardo Torres


2 Answers

Go to your project level android directory and run ./gradlew clean If the problem persists, delete node_modules folder and npm install or you can do this manually: npm list and then resolve all UNMET DEPENDENCY issues

like image 90
web_walkerX Avatar answered Sep 26 '22 23:09

web_walkerX


Step1: Check whether all your "SDK Platforms" and "SDK Tools" is installed and Updated"

Step2: Create "local.properties" file in android folder and paste the following

sdk.dir = /Users/USERNAME/Library/Android/sdk

THIS SHOULD SOLVE YOUR PROBLEMS

like image 25
Ignatius Andrew Avatar answered Sep 26 '22 23:09

Ignatius Andrew