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.
Asked
Active
Viewed 165 times
0
-
let me guess, you're using SDK 28? try changing to SDK 27, and see if you get the preview. – Jacob Celestine Aug 17 '18 at 10:57
-
try changing sdk to 25 in preview options – Quick learner Aug 17 '18 at 11:00
-
post your styles.xml here – Parth Patel Aug 17 '18 at 11:12
-
post your xml file for better understanding – Arbaz.in Aug 17 '18 at 11:12
-
you can refer this once: https://stackoverflow.com/a/51686210/5870824 – Parth Patel Aug 17 '18 at 11:13
3 Answers
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
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