[英]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.当我在我的项目上运行 react-native run-android 时,我收到 gradle 的构建错误。 I already uninstalled react-native-ftp with npm uninstall --save react-native-ftp, removed that dependency of node_modules, clear./gradle cached files.
我已经用 npm uninstall --save react-native-ftp 卸载了 react-native-ftp,删除了 node_modules 的依赖,清除了./gradle 缓存文件。 But the error continuous..
但是错误连续..
In my environment windows this project works normally.在我的环境 windows 这个项目工作正常。
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)
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 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
Step1: Check whether all your " SDK Platforms " and " SDK Tools" is installed and Updated"步骤1:检查您所有的“ SDK Platforms ”和“ SDK Tools”是否已安装并更新”
Step2: Create " local.properties " file in android folder and paste the following Step2:在android文件夹中创建“ local.properties ”文件并粘贴以下内容
sdk.dir = /Users/USERNAME/Library/Android/sdk
THIS SHOULD SOLVE YOUR PROBLEMS这应该可以解决您的问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.