简体   繁体   中英

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

I am using android studio 3.0.1, and I got an error:

Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. Could not create service of type AnnotationProcessorDetector using JavaGradleScopeServices.createAnnotationProcessorDetector().

Can you help me to understand the above error and let me know how to fix it in 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:

* 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:

  Stopping Daemon(s)
  1 Daemon stopped

Run the following command in the terminal:

gradle --stop

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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