繁体   English   中英

无法解析配置“:app:debugRuntimeClasspath”的所有任务依赖项

[英]Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'

I am developing a mobile app with using react-native on WebStorm and trying to test it via an Android emulator(Pixel API 28) which I created via using AVD Manager of Android Studio. 问题是当我运行react-native run-android命令时,出现以下错误:

Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration             
':app:debugRuntimeClasspath'.
   > Could not resolve com.facebook.react:react-native:+.
     Required by:
         project :app
      > Failed to list versions for com.facebook.react:react-native.
         > Unable to load Maven meta-data from         
https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
            > Could not HEAD 
'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
               > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/35.158.228.205, jcenter.bintray.com/3.120.47.203] failed: Read timed out

我尝试使用以下命令清理缓存,但没有奏效:

npm cache clean --force

我在 web 上找不到一些类似的问题,我不确定要显示与此问题相关的内容。

当我尝试运行我之前完美运行的一个项目时,在收到此错误后,我看到它也引发了相同的错误。 同样,当我创建一个新的 react-native 项目并尝试运行它时,我也遇到了同样的错误。 我该如何解决这个问题?


我仍在寻找解决方案。 任何人都知道如何解决它?

我终于弄清楚了问题所在。 我通过学校的网络连接到互联网,它限制了一些下载。 所以,这就是我得到这个错误的原因。 对于遇到相同错误的人,请尝试连接到错误中的链接以判断是否禁止。

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM