我可以在Android Studio的Project Explorer中隐藏某些文件和文件夹吗?

时间:2018-10-03 05:39:11

标签: android android-studio

在特定情况下(例如在构建时),项目中应包含许多文件或文件夹,但用户不能对其进行编辑。

enter image description here

在上图中,用户很少编辑src,res文件夹以及应用程序级别gradle文件和proguard之外的所有内容。 (即使您必须对其进行编辑,之后它也会再次被隐藏)

我想隐藏这些项目,但是我不想使用Android资源管理器,因为我想为每个f文件夹看到不同的图层。

是否有一种方法可以只查看我想要的文件和文件夹,而不删除实际文件,如下面的图像?

enter image description here enter image description here

1 个答案:

答案 0 :(得分:2)

转到文件->设置。 然后在“编辑器”部分下,选择“文件类型”。

您可以在其中定义忽略文件类型。请参见以下屏幕截图。File Types section

有关更多详细信息-> https://intellij-support.jetbrains.com/hc/en-us/community/posts/205824519-Is-there-a-way-to-hide-non-project-files-from-project-file-browser