<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.MainFragment">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
Preview will looks like this:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.MainFragment">
</androidx.constraintlayout.widget.ConstraintLayout>
Preview will looks like this:
I upgraded Android Studio to Electric Eel and now, in XML, the preview often fails to display properly as in the first image. Why does this happen and how can I resolve it? This issue only occurred after I upgraded Android Studio.
CodePudding user response:
I have this issue too, I change material version to 1.7.0 and Android Studio Layout Rendering working again
CodePudding user response:
I downgraded the Material Design library from 1.8.0 to 1.7.0 and the problem disappeared. I think the issue was with the new version of the Material Design.