Android的工作室:排除在搜索结果中的build文件夹中的文件 [英] Android Studio : Exclude files in build folder from search result
问题描述
我有,我有多个模块,每个模块根据A股模块这些模块的一个Android Studio项目。让我们说,这股模块有一个XML文件调用的 sample.xml中
I have an Android Studio project in which I have multiple modules, each of those module depending on a share module. And let's say that this share module has an xml file call sample.xml
当我搜索打开文件是导航 - >文件... 并输入sample.xml的,我会得到
When I search to open file with Navigate -> Files... and type "sample.xml", I'll get
- 分享/ src目录/主/ RES /价值/ sample.xml中
- ModuleA /编译/中间体/爆炸,ARR /.../ RES /价值/ sample.xml中
- ModuleB /编译/中间体/爆炸,ARR /.../ RES /价值/ sample.xml中
- ModuleC /编译/中间体/爆炸,ARR /.../ RES /价值/ sample.xml中
- 为模/编译/中间体/爆炸,ARR /.../ RES /价值/ sample.xml中
...
由于在建文件夹中的文件生成的文件,我们应该对其进行编辑,没有原因,我想包括他们在我的搜索结果。反正我有可以排除他们?
Since the files in build folder are generated files and we should edit them, there is not reason why I want to include them in my search result. Is there anyway I can exclude them?
推荐答案
要简单地说,和实际排除从搜索构建路径,您需要按照弗兰克的回答点1和2,然后因为没有合适的作用域实际上排除build文件夹,只需做到这一点:
To put it simply, and to actually exclude build paths from your search, you need to follow Frank's answer point 1 and 2, then because there's no suitable scope that actually exclude the build folder, simply do this:
从查找路径对话框开始,
Starting from the Find in Path dialog,
1) Tap the ... to configure a scope
2) Click the + and give your new scope a name
3) Enter "!file:build//*" in the pattern without the double quotes
4) Tap ok and use your new scope
如果您还希望有一个单一模块的范围,为您的模块范围(包括递归你的模块路径),然后在你的模式的开头添加这样的:
If you further want to have a scope for a single module, create a scope for your module (including recursively your module path), then add this at the beginning of your pattern:
!file:build//*&&
例如,2模块范围:
!file:build//*&&file[MODULE1_DIRECTORY_NAME]:*/||file[MODULE2_DIRECTORY_NAME]:*/
只得到了完整的答案从这里报告的问题阅读弗兰克的回答和后7:<一href=\"http://$c$c.google.com/p/android/issues/detail?id=61488\">http://$c$c.google.com/p/android/issues/detail?id=61488
这篇关于Android的工作室:排除在搜索结果中的build文件夹中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!