0

I just installed android studio on my new windows 10. I was previously using on windows 8 and it was working fine. The Issue I'm facing is quite basic yet very important. I cannot see the layout design components. Please view the image it will help you understand better.

Android Studio Screen Shot

Nic3500
  • 8,144
  • 10
  • 29
  • 40

3 Answers3

0

You need to set Constraint position in parent view

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:id="@+id/ConstraintLayout">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:text="hello World"
        />
</android.support.constraint.ConstraintLayout>
jessica
  • 1,700
  • 1
  • 11
  • 17
0

enter image description here

In the editor click skyblue colored icon,you will get Force refresh layout option at last.

click it .it will refresh the layout.

if wont work

  • change the device and themes.

  • clean and rebuild project then open the xml file.

sasikumar
  • 12,540
  • 3
  • 28
  • 48
0

Well it seems like bug in AppCompat latest version.

Change AppCompat library version in Gradle :

At Design Time

From

implementation 'com.android.support:appcompat-v7:28.0.0-rc01' 

To

implementation 'com.android.support:appcompat-v7:27.1.1'

At Build

Change AppCompat Version back to :

implementation 'com.android.support:appcompat-v7:28.0.0-rc01'.

by doing this previews will be available for the design and at build you will be using the latest sdk. :)

wiils
  • 143
  • 2
  • 12