gpt4 book ai didi

eclipse - 尝试使用Gradle在Eclipse中编译和调试FitNesse

转载 作者:行者123 更新时间:2023-12-03 04:01:11 24 4
gpt4 key购买 nike

我想从Eclipse运行FitNesse,因此可以在开发“DataFlex Slim Runner”时调试一些问题。 https://github.com/unclebob/fitnesse上的自述文件说:

  • https://github.com/unclebob/fitnesse克隆FitNesse Git存储库。
  • 通过File-> Import ...-> Gradle Project导入FitNesse。
  • 选择刚刚克隆的项目文件夹。按照向导。
  • 确保项目属性具有Java 7编译器或更高版本。

  • 第一步可以,但是我无法完成步骤2和3。

    在Eclipse中,我选择Import Gradle Project。然后,我选择项目根目录,然后选择刚刚克隆的文件夹。在“导入选项”步骤中,选择“渐变包装器(推荐)”,然后选择“下一步”。但是,当单击“完成”时,出现以下错误:
    Synchronize Gradle builds with workspace failed due to an unexpected error.
    Unsupported method: HierarchicalEclipseProject.getIdentifier().
    The version of Gradle you connect to does not support that method.
    To resolve the problem you can change/upgrade the target version of Gradle
    you connect to.
    Alternatively, you can ignore this exception and read other information from
    the model.

    org.gradle.tooling.model.UnsupportedMethodException: Unsupported method: HierarchicalEclipseProject.getIdentifier().
    The version of Gradle you connect to does not support that method.
    To resolve the problem you can change/upgrade the target version of Gradle you connect to.
    Alternatively, you can ignore this exception and read other information from the model.
    at org.gradle.tooling.model.internal.Exceptions.unsupportedMethod(Exceptions.java:33)
    at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$InvocationHandlerImpl.invoke(ProtocolToModelAdapter.java:357)
    at com.sun.proxy.$Proxy37.getIdentifier(Unknown Source)
    at com.gradleware.tooling.toolingmodel.repository.internal.DefaultOmniEclipseProject.from(DefaultOmniEclipseProject.java:250)
    at com.gradleware.tooling.toolingmodel.repository.internal.DefaultOmniEclipseProject.from(DefaultOmniEclipseProject.java:246)
    at com.gradleware.tooling.toolingmodel.repository.internal.DefaultOmniEclipseGradleBuild.from(DefaultOmniEclipseGradleBuild.java:46)
    at com.gradleware.tooling.toolingmodel.repository.internal.DefaultSingleBuildModelRepository$8.apply(DefaultSingleBuildModelRepository.java:181)
    at com.gradleware.tooling.toolingmodel.repository.internal.DefaultSingleBuildModelRepository$8.apply(DefaultSingleBuildModelRepository.java:177)
    at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeAndWait(BaseModelRepository.java:164)
    at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.access$000(BaseModelRepository.java:41)
    at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository$2.call(BaseModelRepository.java:121)
    at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4724)
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)
    at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
    at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721)
    at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.getFromCache(BaseModelRepository.java:138)
    at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeRequest(BaseModelRepository.java:117)
    at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeRequest(BaseModelRepository.java:88)
    at com.gradleware.tooling.toolingmodel.repository.internal.DefaultSingleBuildModelRepository.fetchEclipseGradleBuild(DefaultSingleBuildModelRepository.java:185)
    at org.eclipse.buildship.core.workspace.internal.DefaultModelProvider.fetchEclipseGradleBuild(DefaultModelProvider.java:53)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.synchronizeBuild(SynchronizeGradleBuildsJob.java:77)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.runToolingApiJob(SynchronizeGradleBuildsJob.java:69)
    at org.eclipse.buildship.core.util.progress.ToolingApiJob$1.run(ToolingApiJob.java:73)
    at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:61)
    at org.eclipse.buildship.core.util.progress.ToolingApiJob.run(ToolingApiJob.java:70)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    该怎么办???

    最佳答案

    您必须更改用于使其工作的Gradle发行版。据说:

    Unsupported method: HierarchicalEclipseProject.getIdentifier()
    The version of Gradle you connect to does not support that method.
    To resolve the problem you can change/upgrade the target version of Gradle you connect to.

    我不知道您当前的版本是什么,但是我可以说,最新的Gradle发行版没有此方法,您可以检查它 here,但是可以检查Gradle版本2.14 has it。所以您可以尝试使用此版本的Gradle,尽管我不知道这是否意味着更新您的Gradle。

    更新:刚刚研究了Fitnesse构建脚本,它使用Gradle 3.1,但不确定,是否可以将Gradle版本更改为更低版本。因此在我看来,您必须处理Eclipse,可能是较新的版本支持新的Gradle发行版,但并不确定。如果您使用的是 buildship,则该版本为1.0.20,而较新的版本应支持Gradle 3.1。

    关于eclipse - 尝试使用Gradle在Eclipse中编译和调试FitNesse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41054482/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com