What could be the mistake?

Asked

Viewed 68 times

0

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not create service of type AnnotationProcessorDetector using JavaGradleScopeServices.createAnnotationProcessorDetector().

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Finished with error: Gradle task assembleDebug failed with exit code 1
  • 2

    Ride with --stacktrace and put the output to analyze. As we conclude we will request some code snippets for verification. OK?

1 answer

1

According to this Opinion of the Github, do:

./gradlew compileJava recompile --stacktrace

According to this Issue try: gradle --stop afterward: gradle --test to restart.

If it doesn’t work try:

Remove the directory . Gradle (linux):

./gradlew --stop
sudo rm .gradle/4.10.1/javaCompile/classAnalysis.bin 
rm -r build
rm -r app/build
sudo chown [username] .gradle/4.10.1/javaCompile
sudo chown [username] .gradle/4.10.1/javaCompile/*
./gradlew build

In windows you can remove manually.

If it doesn’t work try this staff recommends:

Give a --stacktrace --info to collect more information about the problem if no solution can be found.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.