I'm trying to build a Gradle project in eclipse and this error is displayed when I import the project I want to work on. I have tried to create a new project it builds successfully
Asked
Active
Viewed 9,984 times
0
-
Double click the error line; a stack trace is probably going to show. It's not reasonable to expect to be able to debug "There is a problem. Gooooooood luck with it! Tata!", which is what you're asking for now. (I'm relying a little bit on eclipse giving you _something_ more than this nebulous error, usually double clicking gets you there). – rzwitserloot Jun 28 '22 at 18:43
-
may be https://stackoverflow.com/questions/68321708/could-not-run-phased-build-action-using-connection-to-gradle-distribution – LMC Jun 28 '22 at 21:11
1 Answers
-1
in the Gradle build file
if(JavaVersion.current() != JavaVersion.VERSION_1_8) throw new GradleException("This project requires Java 8, but it's running on"+JavaVersion.current()) sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
And this is the description of the error
The supplied phased action failed with an exception. A problem occurred configuring root project 'IntroToUnitTesting'. A problem occurred evaluating root project 'IntroToUnitTesting'. This project requires Java 8, but it's running on 18

Basma Ashraf
- 1
- 1
- 2
-
Hello, and welcome to Stack Overflow ! I suggest you edit your question instead of answering your own question with details on said question. Answers are meant to be helpful to people having a similar issue and this might be misleading to other readers. – Yassine Badache Jun 29 '22 at 08:40