【问题标题】:Gradle execution failed for task ‘:test’ when changing sourceCompatibility and targetCompatibility from 1.8 to 13将 sourceCompatibility 和 targetCompatibility 从 1.8 更改为 13 时,任务“:test”的 Gradle 执行失败
【发布时间】:2019-10-24 19:24:44
【问题描述】:

从源和目标兼容性从 1.8 迁移到 13 时出现以下错误 FAILURE:构建失败并出现异常。 什么地方出了错: 任务“:test”执行失败。 读取类文件 C:\Users\FixedSizeFifoDoubleArrayTest.class 失败

尝试改变 源兼容性 = 1.8 目标兼容性 = 13

【问题讨论】:

    标签: gradle java-8 gradlew java-13


    【解决方案1】:

    添加以下代码

    tasks.withType(Test){
    scanForTestClasses = false
    include "**/*Test.class"
     }
    

    按照下面的链接描述的 build.gradle 文件

    Execution failed for task ‘:test’ when changing sourceCompatibility and targetCompatibility from 1.8 to 13

    【讨论】:

      猜你喜欢
      • 2013-05-15
      • 1970-01-01
      • 2018-08-30
      • 2013-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-08
      • 1970-01-01
      相关资源
      最近更新 更多