为什么“删除未使用的资源"没有找到Android的工作室什么? [英] Why "Remove Unused Resources" doesn't find anything in Android studio?
问题描述
正如你可能知道,删除未使用的资源
最近加入到Android的工作室,的 Android的工作室2.0 preVIEW 5 。
As you might know, Remove Unused Resources
has added recently to Android studio, Android Studio 2.0 Preview 5.
我运行该功能通过右键点击项目名称,然后重构/删除未使用的资源
。它显示一个对话框,当我点击重构
或 preVIEW
按钮,没有任何反应。我相信一定有很多问题,因为这是一个非常大的项目,但我没有看到结果。
你能看到什么结果?
I run this function by right click on the name of project then Refactor/Remove Unused Resources
. It shows a dialog and nothing happens when I click Refactor
or Preview
buttons. I believe there must be a lot of problems since this is a very big project but I don't see result.
Are you able to see any result?
推荐答案
好吧,我只是发现有什么问题。
Okay, I just found what is the problem.
问题是,正如我所说,我右键点击项目名称,并从那里也重构。因此,这种方式不工作(Android的工作室的家伙必须禁用此功能不在身边人手人)
The problem was, as I mentioned I was right clicking on project name and did refactoring from there. So this way doesn't work (Android Studio guys must disable this functionality to not staffing people around)
所以,通过运行分析/检查code
我可以看到未使用的资源列表。我一倍点击一个字符串项目,然后 String.xml
打开并做重构/删除未使用的资源...
所有资源删除:+1
So, By running Analyze/inspect code
I could see a list of unused resources. I doubled clicked on an String item then String.xml
opened and by doing refactoring/remove unused resources...
all resources removed :+1
所以这是的伎俩。我能看到的git的所有更改的文件。希望它可以帮助你们。
So it was the trick. I could see all changed files on git. Hope it helps you guys.
这篇关于为什么“删除未使用的资源"没有找到Android的工作室什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!