协调器布局未在预览中显示

Coordinator layout is not displaying on preview

我有一个协调器布局,我想在其中显示带有 nestedScrollView 的底部 sheet。但是我的协调器布局无法正常工作,因为它没有显示任何预览。

This is the preview

xml 文件:

 <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:map="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context=".StartingActivity">


  <androidx.core.widget.NestedScrollView
      android:layout_width="match_parent"
      android:layout_height="250dp"
      android:background="@drawable/gradiantbackground2">

  </androidx.core.widget.NestedScrollView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

gradle 文件依赖:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.android.support:design:29.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'devs.mulham.horizontalcalendar:horizontalcalendar:1.1.7'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.legacy:legacy-support-v13:1.0.0'
    implementation 'com.jjoe64:graphview:4.2.2'
    implementation 'com.google.android.material:material:1.1.0-alpha09'

}

如果没有显示错误,请尝试 rebuild/restart Android Studio。