skip to Main Content

Before the new version of Android Studio codenamed "Iguana", one could refresh a layout preview simply by giving focus to the outer edge of the preview and pressing R. In this new version, that does not work anymore (i.e. a loading bar would appear on the very bottom saying "Refreshing layout"). Perhaps there is an alternate way to do this without having to build the whole module?enter image description here

2

Answers


  1. I had the same problem with the AVDs that I created before this new update. The solution that worked for me was either to use the "wipe data" option for the existing AVDs or to create a new AVD from scratch.

    Update: These solutions only work temporarily. The screen refresh issue persists after a few minutes. Therefore, there’s no solution on my end.

    Update 2: I strongly recommend reverting to the Hedgehog version from the Iguana version, as the latter seems to be unstable.

    Login or Signup to reply.
  2. My suggestion is to enable "Live updates" for Compose preview so you don’t even need to press R to refresh the preview.

    You can enable this flag from the Android Studio settings at:
    Editor -> Design tools -> Compose Preview section -> Enable live updates

    hope this helps

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search