gpt4 book ai didi

intellij-idea - IntelliJ在复制任务中将导入添加到Gradle

转载 作者:行者123 更新时间:2023-12-03 11:42:23 26 4
gpt4 key购买 nike

我在IntelliJ 2016.1中有一个非常烦人且无法解释的行为:

如果在构建文件中使用Gradle复制任务,则IntelliJ在对该文件进行任何编辑时都会添加以下内容:

com.sun.org.apache.xalan.internal.xsltc.compiler.Copy

这当然是不必要的,因为此任务是内置的Gradle。
执行后,将导致此错误:

Cannot create task of type 'Copy' as it does not implement the Task interface.



复制任务只是一个简单的例子,例如:
task copyNodeModules(type: Copy) {
group="_webapp"
from('./src/main/ts/node_modules') {
include '**/*'
exclude '**/lite-server'
exclude '**/json-server'
exclude '**/.bin'
}
into project.buildDir.path + '/resources/someFolder'
}

最佳答案

正在去Settings -> Auto Import -> Exclude from auto import and completion
并添加'com.sun.org.apache.xalan.internal.xsltc.compiler'为我修复了此问题。

关于intellij-idea - IntelliJ在复制任务中将导入添加到Gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37347657/

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