简体   繁体   中英

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. 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.

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

Here are the steps I use to set this up:

  1. Bring up Find in Path dialog (Ctrl+Shift+F on my machine).
  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".
  4. In the Pattern field, paste in the following pattern and click 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM