简体   繁体   English

React Native——无法确定任务“:app:mergeDebugAssets”的依赖关系

[英]React Native -- Could not determine the dependencies of task ':app:mergeDebugAssets'

I'm trying to run my project with the npm run android command and it throws this error for me:我正在尝试使用npm run android命令运行我的项目,它会为我抛出此错误:

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1579 file(s) to forward-jetify. Using 12 workers...
info Starting JS server...
info Installing the app...
Configuration on demand is an incubating feature.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> You must specify a URL for a Maven repository.

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

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.bat app:installDebug -PreactNativeDevServerPort=8081

what I did so far is cd to the android folder and run ./gradlew clean and it says BUILD SUCCESSFUL with no error also I delete my node_module folder and run npm install again but no luck.到目前为止我所做的是cd到 android 文件夹并运行./gradlew clean并且它说BUILD SUCCESSFUL没有错误我也删除了我的node_module文件夹并再次运行npm install但没有运气。 I appreciate any help.我感谢任何帮助。

I had a similar error, in my case I edited my android/build.gradle file like this:我有一个类似的错误,在我的例子中,我像这样编辑了我的android/build.gradle文件:

after

...
jcenter()

add line添加行

mavenCentral()

Don't know if it help in your case, but it worked for me不知道对你的情况是否有帮助,但对我有用

PS as I understand there is some problems with access some files at https://jcenter.bintray.com/ PS 据我了解,在https://jcenter.bintray.com/访问某些文件存在一些问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法确定任务 ':app:mergeDebugAssets' 的依赖关系 - Could not determine the dependencies of task ':app:mergeDebugAssets' React Native:无法确定任务“:app:installDebug”的依赖关系 - React Native: Could not determine the dependencies of task ':app:installDebug' 无法确定任务 ':app:installDebug' 的依赖项在 Visual Studio 代码上反应原生 - Could not determine the dependencies of task ':app:installDebug' react native on visual studio code 错误:在运行 React Native 项目时无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Error : Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' while running React Native Project 无法确定任务“:notifee_react-native:compileDebugAidl”的依赖关系 - Could not determine the dependencies of task ':notifee_react-native:compileDebugAidl' React-native 项目构建失败:找不到 com.android.tools.lint ,无法确定任务 ':app:lintVitalRelease' 的依赖关系 - React-native project Build failed: Could not find com.android.tools.lint , Could not determine the dependencies of task ':app:lintVitalRelease' React Native - 无法确定任务':react-native-reanimated:generateJsonModelDebug'的依赖关系 - React Native - Could not determine the dependencies of task ':react-native-reanimated:generateJsonModelDebug' 我无法执行 npx react-native run-android,Java 错误; 无法确定任务“:app:compileDebugJavaWithJavac”的依赖关系。 LINUX - I can't do npx react-native run-android, Java error; Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. LINUX React-Native 构建失败的应用程序:mergeDebugAssets - React-Native Build Failed app:mergeDebugAssets 当我尝试运行 npx react-native run-android 时,任务:应用程序:mergeDebugAssets 失败 - Task :app:mergeDebugAssets FAILED when I try to run npx react-native run-android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM