如何为IntelliJ IDEA项目禁用或启用Gradle/Maven自动导入? [英] How do I disable or enable Gradle / Maven auto-import for an IntelliJ IDEA project?

查看:1150
本文介绍了如何为IntelliJ IDEA项目禁用或启用Gradle/Maven自动导入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无意间单击了链接以启用对正在处理的Gradle项目的自动导入.如何为当前项目禁用它?我发现的唯一选项是默认情况下对所有项目禁用它.

I inadvertently clicked the link to enable auto import of a Gradle project I was working on. How do I disable it for the current project? The only option I'm finding is for disabling it by default for all projects.

我正在使用IDEA 2017.1.

I'm on IDEA 2017.1.

推荐答案

自动导入为

Auto import is disabled by default while editing (and enabled for external changes) and an icon is displayed in the top right of the build file editor after you make changes to the build file so that you can load the changes and perform the import:

2020.2 + 版本中,可以在设置"(macOS上的首选项")中配置自动重新加载行为.构建,执行,部署|生成工具|更改构建脚本后重新加载项目:

In 2020.2+ versions automatic reload behavior can be configured at Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Reload project after changes in the build scripts:

2020.1.2 版本开始,有一个用于导入更改的三态选项,它适用于Gradle和Maven:

Starting with 2020.1.2 version there is a 3-state option for importing changes, it's available for both Gradle and Maven:

2020.1.1 版本中,您可以启用或禁用外部更改的自动重新加载(2020.1中不存在该选项):

In 2020.1.1 version you can enable or disable the automatic reload of the external changes (option not present in 2020.1):

另请参见相关功能请求,以使UI更加清晰很难注意到建议导入设置的小图标.

See also the related feature request to make the UI more obvious as it may be hard to notice a small icon suggesting to import the settings.

在2020.1版本之前,您可以在设置" |禁用"中禁用它.构建,执行,部署|生成工具|摇篮| 使用自动导入:

Before 2020.1 version you could disable it in Settings | Build, Execution, Deployment | Build Tools | Gradle | Use auto-import:

这篇关于如何为IntelliJ IDEA项目禁用或启用Gradle/Maven自动导入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆