简体   繁体   English

如何在Android Studio的快速文件搜索中排除所有构建文件?

[英]How can I exclude all build files in quick file search at Android Studio?

When I used Command+Shift+O search file in my AndroidStudio for Mac.The result will has too many unnecessary files like in "build" folder. 当我在AndroidStudio for Mac中使用Command + Shift + O搜索文件时。结果将包含太多不必要的文件,例如“build”文件夹。 I've never seen before until recently.How can I exclude these? 我直到最近才见过。如何排除这些? 在此输入图像描述

Android Studio (like its progenitor IntelliJ) allows you to define a custom scope to help you exclude intermediates files when searching. Android Studio(与其祖先IntelliJ一样)允许您定义自定义范围,以帮助您在搜索时排除中间文件。

截图从范围中选择自定义选项] 1

Here are the steps I use to set this up: 以下是我用来设置它的步骤:

  1. Bring up Find in Path dialog (Ctrl+Shift+F on my machine). 打开“在路径中查找”对话框(在我的机器上按Ctrl + Shift + F)。
  2. In the Scope area, select the Custom radio button. 在“范围”区域中,选择“自定义”单选按钮。 Then tap the "..." button on the right side of the dropdown. 然后点击下拉列表右侧的“...”按钮。 This brings up the Scopes dialog. 这将打开“范围”对话框。
  3. Click the "+" button on the left side of the Scopes dialog, which will bring up the Add New Scope dialog. 单击“范围”对话框左侧的“+”按钮,将显示“添加新范围”对话框。 Name it "ExcludeIntermediates". 将其命名为“ExcludeIntermediates”。
  4. In the Pattern field, paste in the following pattern and click OK: 在Pattern字段中,粘贴以下模式,然后单击OK:

     !file:*intermediates*/&&!file:*generated*/ 

This pattern excludes R.java files and other intermediates such as layout files in exploded-aar and AndroidManifest.xml copies in filtered_manifests folders. 此模式不包括R.java文件和其他中间元素,例如在filtered_manifests文件夹中的explosion-aar和AndroidManifest.xml副本中的布局文件。

https://stackoverflow.com/a/32238593/1815624 https://stackoverflow.com/a/32238593/1815624

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android Studio:从搜索结果中排除构建文件夹中的文件 - Android Studio : Exclude files in build folder from search result 在 Android Studio 中搜索文本时如何排除自动生成代码? - How can I exclude auto-generation code when I search text in Android Studio? 如何在 Android Studio 中搜索字符串的所有文件? - How to search all files for a string in Android Studio? 当我在 Android Studio 4.1 中使用 Git 时,如何显示所选文件的所有分支中的所有历史文件 - How can I display all history files in all branches for selected file when I use Git in Android Studio 4.1 当我使用 Android Studio Chipmunk 时,如何重写 build.gradle 文件? - How can I rewrite build.gradle files when I use Android Studio Chipmunk? 在构建Android Studio中排除模块 - Exclude module on build Android Studio 如何使用 SQL 数据库在 Android Studio 中搜索表的所有列 - How can I search all columns of a table in Android Studio using SQL database 我如何在 Android Studio 中构建旧的 Android 项目 - How i can build old Android project in Android Studio 如何在android studio 0.1 Build 130.677228中创建AAR文件 - How can I create aar file in android studio 0.1 Build 130.677228 Android Studio:如何从搜索和其他功能中排除文档文件夹? - Android Studio: How to exclude Doc Folder from Search and other functionality?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM