I can't reproduce this. In an empty directory I get: $ mkdir empty $ cd empty $ gradle --stacktrace --debug -g /tmp clean <snip> 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Task 'clean' not found in root project 'asd'. 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try: 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run gradle tasks to get a list of available tasks. Run with --scan to get full insights. 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is: 18:33:49.406 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.execution.TaskSelectionException: Task 'clean' not found in root project 'asd'. <snip>
And on a very small gradle project with no external dependencies I get a "BUILD SUCCESSFUL in 0s" $ git clone https://github.com/jabedhasan21/java-hello-world-with-gradle.git $ gradle --stacktrace --debug -g /tmp clean <snip> 18:37:34.955 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD SUCCESSFUL in 0s <snip> Please make sure you don't have any gradle daemon or java processes running $ pgrep -a gradle $ pgrep -a java and kill them if needed $ pkill -9 gradle $ pkill -9 java And that the cache, daemon, and native directories have been removed (I am forcefully creating them in /tmp through the '-g /tmp' parameter): $ rm -rf /tmp/cache /tmp/daemon /tmp/native Also please confirm that you are running the right gradle version: $ gradle -version <snip> Groovy: 2.4.16 Ant: Apache Ant(TM) version 1.10.5 compiled on March 5 2019 JVM: 1.8.0_191 (Oracle Corporation 25.191-b12) OS: Linux 4.19.0-13-generic amd64 <snip> $ apt policy gradle gradle: Installed: 4.4.1-5~18.04.1 Candidate: 4.4.1-5~18.04.1 Version table: *** 4.4.1-5~18.04.1 500 500 http://localhost:9999/ubuntu-br bionic-proposed/universe amd64 Packages 100 /var/lib/dpkg/status 3.4.1-7ubuntu1 500 500 http://localhost:9999/ubuntu-br bionic/universe amd64 Packages -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1820389 Title: Gradle on OpenJDK 8: java.lang.NoSuchMethodError: java.lang.invoke.MethodHandles.privateLookupIn() To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gradle/+bug/1820389/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
