如何在IntelliJ IDEA中添加到文件系统的链接? [英] How to add link to file system in IntelliJ IDEA?

查看:369
本文介绍了如何在IntelliJ IDEA中添加到文件系统的链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse中添加新文件时,有一个选项可以从项目外部(硬盘驱动器中的任何位置)添加为文件的链接.该选项是高级选项下的一个名为链接到文件系统中的文件"的复选框.

When adding new file in Eclipse, there is an option to add as a link to a file from outside of the project (anywhere in the hard drive). Option is a checkbox called "Link to file in the file system" under the advanced options.

那么IntelliJ中的此选项在哪里?或更特别是在Android Studio中?

So where is this option in IntelliJ? Or more spesifically in Android Studio?

推荐答案

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.

这篇关于如何在IntelliJ IDEA中添加到文件系统的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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