随着项目的不断扩大,开发中可能会有一些无效资源文件 无效类 或无效参数 无效方法等,这样会导致运行速度变慢,打包apk过大,维护不太容易,对程序继续扩展也会加大苦难,所以要及时对这些无效资源进行处理。
1.查找无效资源快捷方式
1)在Android studio工具栏找到Analyze

2)在Analyze菜单下找到Run Inspection by Name

3)点击该项 并在弹窗中输入 unused resources,点击回车

4)根据自己的需求选择范围---整个项目或者某个module

5)最后结果会在下方工具栏展示,可以根据实际需求进行删减

网友评论