簡體   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