且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在IntelliJ IDEA中添加到文件系统的链接?

更新时间:2023-09-18 10:39:58

IntelliJ IDEA没有此功能,您不能在项目外部链接单个文件.

IntelliJ IDEA doesn't have this feature, you can't link individual files outside of the project.

通常,人们只是将文件复制到项目中.

Normally one just copies a file to a project.

在IntelliJ IDEA中,可以向模块添加其他内容根目录(Project StructureModule设置中的Add Content Root).这样,您可以将其他目录链接到项目,而不是单个文件.

In IntelliJ IDEA it's possible to add additional content roots to the module (Add Content Root in the Project Structure, Module settings). This way you can link additional directories to the project, but not individual files.

Android Studio使用Gradle进行项目构建,并且Gradle不会使用在Project Structure中执行的任何配置.如果要链接其他目录/文件,则必须手动修改build.gradle文件.

Android Studio uses Gradle for project build and any configuration performed in the Project Structure will not be used by Gradle. If you want to link additional directories/files, you will have to modify build.gradle files by hand.