Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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? enter image description here

like image 590
H3c Avatar asked Mar 31 '16 02:03

H3c


1 Answers

Android Studio (like its progenitor IntelliJ) allows you to define a custom scope to help you exclude intermediates files when searching.

Screenshot selecting custom option from scope]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

like image 166
2 revs Avatar answered Oct 13 '22 06:10

2 revs