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?
Asked
Active
Viewed 1,703 times
10

H3c
- 871
- 1
- 6
- 17
-
2I believe this question is properly answered here -> http://stackoverflow.com/questions/28937468/android-studio-exclude-files-in-build-folder-from-search-result – Jose Mar 31 '16 at 03:36
-
Yes, http://stackoverflow.com/a/31293830/1983799 can resolve my question.Thx.. – H3c Mar 31 '16 at 07:13
-
Possible duplicate of [Ignore R.java fies in Find results](http://stackoverflow.com/questions/22973939/ignore-r-java-fies-in-find-results) – CrandellWS Jan 02 '17 at 09:19
1 Answers
1
Android Studio (like its progenitor IntelliJ) allows you to define a custom scope to help you exclude intermediates files when searching.
Here are the steps I use to set this up:
- Bring up Find in Path dialog (Ctrl+Shift+F on my machine).
- 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.
- Click the "+" button on the left side of the Scopes dialog, which will bring up the Add New Scope dialog. Name it "ExcludeIntermediates".
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.

Community
- 1
- 1

CrandellWS
- 2,708
- 5
- 49
- 111