0

Just installed Android Studio and installed a Nexus 5 emulator. Now, when designing apps in AS you commonly see a phone in the design tab. I do, but when adding new fields, texts, images etc the screen (both design and blueprint) stays static i.e does not change. Note that when running the app my emulator works fine, but it seems I can't design it in real-time. There are no errors related to this, it's just static.

So as you can see in this image below, I have one text field and one image, when running it the emulator works fine. But the AS phone is just blank. How do I solve this so I can design more easily in Android Studio?

Static phone

Error messages

  • I'll just assume the mods will deem this to be a duplicate, even if it isn't. Searched on Google ofc but didn't find anything helpful. – Felix Bergman Jul 28 '18 at 19:00
  • I’m wondering what extra value this comment brings. If it’s closed as duplicate you’ll get your answer there and everything is fine. Mods also don’t usually go closing things as duplicates, it’s us other users who vote for that to happen if we find a duplicate. And as I said that answers the question at the same time. If it doesn’t then it’s not a duplicate and you can say so. – Sami Kuhmonen Jul 28 '18 at 19:10
  • In the design tab I can see few errros in Your layout. Look at left-bottom side of design under Component tree and paste Your xml code also – theJango Jul 28 '18 at 19:13

2 Answers2

0

try to force refresh the layout enter image description here

Tarek
  • 146
  • 3
  • 15
0

Your image shows the error clearly as

'Render error'
'missing constraint in ConstraintLayout'

As per documentation

Although a missing constraint won't cause a compilation error, the Layout Editor indicates missing constraints as an error in the toolbar. To view the errors and other warnings, click Show Warnings and Errors . To help you avoid missing constraints, the Layout Editor can automatically add constraints for you with the Autoconnect and infer constraints features.

Look for more details here

Add proper constraint and you will be able to see your UI components in the preview.

theJango
  • 1,100
  • 10
  • 22