android-studio - android studio修改完代码后不实时提示错误
黄舟
黄舟 2017-04-18 09:04:50
0
2
759

比如,修改layout文件里某个控件的id名称,那么修改完后,按常理对应的activity中的findViewById里面的名字应该就不一致了,那这个activity文件就应该有报错提示。可是没有。非得clean project再rebuild project才会提示错误,或者是找到这个layout对应的activity文件并打开这个activity文件后错误就出来了。按照网上查到的方法也没有用:

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
阿神

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

伊谢尔伦

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!