[英]Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'
I am using android studio 3.0.1, and I got an error:我正在使用 android studio 3.0.1,但出现错误:
Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
错误:无法确定任务“:app:compileDebugJavaWithJavac”的依赖关系。 Could not create service of type AnnotationProcessorDetector using JavaGradleScopeServices.createAnnotationProcessorDetector().
无法使用 JavaGradleScopeServices.createAnnotationProcessorDetector() 创建 AnnotationProcessorDetector 类型的服务。
Can you help me to understand the above error and let me know how to fix it in android studio 3.0.1?您能帮我理解上述错误并让我知道如何在 android studio 3.0.1 中修复它吗?
看来这个问题取决于您的网络或防火墙中的一些错误,请确保您可以完全访问互联网
It might be a similar issue to mine.这可能与我的问题相似。 Sometimes gradle deamon has not been stopped after your last gradle command execution failed and you got:
有时 gradle deamon 在您最后一次执行 gradle 命令失败后并没有停止并且您得到:
* What went wrong:
Execution failed for task ':xxx:compileJava'.
> Could not create service of type AnnotationProcessorDetector using JavaGradleScopeServices.createAnnotationProcessorDetector().
To fix that you should run:要解决这个问题,您应该运行:
./gradlew --stop
and it should display how many deamon workers were active and be able to run gradle task again:它应该显示有多少守护进程处于活动状态并能够再次运行 gradle 任务:
Stopping Daemon(s)
1 Daemon stopped
Run the following command in the terminal:在终端中运行以下命令:
gradle --stop
https://github.com/gradle/gradle/issues/3708 https://github.com/gradle/gradle/issues/3708
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.