'Android Studio live preview requires project rebuild
I decided to make an application on jetpack compose but when I download the Android Studio canary version 2021.1.1.1 and I try to write some code to see the changes on the preview at the right the preview tab says the preview is not up to date (or something like this) and requires a full project re-build to let me see my code changes
Solution 1:[1]
As of May 2022, There is no solution. Sorry!
Perhaps someday this will change. Until then, if you use jetpack compose, you'll have to do a rebuild your entire project to see the tiniest change in layout.
Furthermore, the requirement that you essentially have to write all your composable functions twice to preview them doubles the amount of boilerplate code you have to write and nearly guarantees that there will be code differences between the preview and actual behavior. Can you say, "Extremely easy to introduce bugs"? I thought you could.
For now, I recommend sticking with the old xml layouts. At least your work flow will be a lot faster. jetpack compose is simply not ready yet.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | SMBiggs |