比如,修改layout文件里某个控件的id名称,那么修改完后,按常理对应的activity中的findViewById里面的名字应该就不一致了,那这个activity文件就应该有报错提示。可是没有。非得clean project再rebuild project才会提示错误,或者是找到这个layout对应的activity文件并打开这个activity文件后错误就出来了。按照网上查到的方法也没有用:
阿神2017-04-18 09:06:50
Double-click to select the modified id name, right-click, select Refactor, and click rename. This will automatically rename them all for you. When deleting, use functions such as Safe Delete
伊谢尔伦2017-04-18 09:06:50
That’s it
For example, if your control is used in many files, you need to traverse all the files in the entire project and find the error locations one by one and mark them in red. This will cost a lot of performance
The correct way is to use shift+F6 to use the rename function provided by the system, which will automatically modify everything for you