Android studio layout xml not updating

老子叫甜甜 提交于 2020-08-03 17:56:17

问题


I am using Android Studio latest version and recently facing a problem that, my layout xml Design view not getting updated rapidly if I have changed background from selector resource or changed the image resource background. I found that Rebuild Project again updating the layout. But my project is little big and its taking some time to rebuild again. It would be nice if there is any other quick solution for this. I have also tried the Synchronize xml option, but not worked as expected. Please suggest me if there is any better option. Thanks.


回答1:


If problem persist just follow these steps:

File> Invalid cache/Restart > Invalidate and Restart

It will then surely work.




回答2:


Not sure when they added this but you can force the layout to refresh in the Design/Blueprint toggle menu (see below). This fixed the issue for me.




回答3:


I was also struck in the same problem and the Temporary and working solution is to change the preview device. If you want you can also switch to the previous device. Layout will be updated.

Sorry for being Late




回答4:


uncheck "Skip installation if APK has not changed":




回答5:


I guess changing the tabs will refresh the layout. Try this. Hope this helps.




回答6:


one time colse that file and open it again may be its reflected your changes if its not work than one time run your app and after changes of of your xml file its reflected in preview.



来源:https://stackoverflow.com/questions/39941222/android-studio-layout-xml-not-updating

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!