提供的分阶段操作在 Eclipse 中失败并出现异常

问题描述 投票:0回答:1

我正在尝试在 Eclipse 中构建 Gradle 项目,当我导入我想要处理的项目时,会显示此错误。 我尝试创建一个新项目,它构建成功

Error Message Java and Gradle versions

java eclipse unit-testing gradle automated-tests
1个回答
0
投票

在 Gradle 构建文件中

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

这是错误的描述

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

© www.soinside.com 2019 - 2024. All rights reserved.