Skip to content Skip to sidebar Skip to footer

Drag/drop Components Are Not Visible In Preview In Android Studio

I am a beginner in android development. I have created a android project. But in the preview section, I am not able to see the components. But components are visible when i run th

Solution 1:

I've had have also this problem and solved it by only selecting another "Theme" cause the default theme appTheme doesn't show added items. If you i.e. select Transulcent, any item becomes visible ;-)

cheers Oliwan

Solution 2:

Maybe sound a weird answer, but self-tested this.

  • Change the XML file's (maybe activity_x.xml) layout's root tag android.support.constraint.ConstraintLayout to LinearLayout, then preview will start working again (as happened in my case). [If not, then perform force refresh (R)]

  • Then switch back to old one, I mean: Change the XML file's (maybe activity_x.xml) layout's root tag LinearLayout to android.support.constraint.ConstraintLayout. And force a refresh.

Solution 3:

This does seem to be a bug in Android Studio. When it showed up for me, I fixed it by making a trivial change in the app build.gradle (change version code), do a gradle sync, then change back and sync again.

After that, the design view worked again.

Post a Comment for "Drag/drop Components Are Not Visible In Preview In Android Studio"