簡體   English   中英

錯誤:無法確定任務':app:compileDebugJavaWithJavac'的依賴關系

[英]Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

我正在使用 android studio 3.0.1,但出現錯誤:

錯誤:無法確定任務“:app:compileDebugJavaWithJavac”的依賴關系。 無法使用 JavaGradleScopeServices.createAnnotationProcessorDetector() 創建 AnnotationProcessorDetector 類型的服務。

您能幫我理解上述錯誤並讓我知道如何在 android studio 3.0.1 中修復它嗎?

看來這個問題取決於您的網絡或防火牆中的一些錯誤,請確保您可以完全訪問互聯網

這可能與我的問題相似。 有時 gradle deamon 在您最后一次執行 gradle 命令失敗后並沒有停止並且您得到:

* What went wrong:
Execution failed for task ':xxx:compileJava'.
> Could not create service of type AnnotationProcessorDetector using JavaGradleScopeServices.createAnnotationProcessorDetector().

要解決這個問題,您應該運行:

./gradlew --stop

它應該顯示有多少守護進程處於活動狀態並能夠再次運行 gradle 任務:

  Stopping Daemon(s)
  1 Daemon stopped

在終端中運行以下命令:

gradle --stop

https://github.com/gradle/gradle/issues/3708

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM