Android 预览时未显示协调器布局
我有一个协调器布局,我想在其中显示一个带有nestedScrollView的底部工作表。但是我的协调器布局不能正常工作,因为它没有显示任何预览 xml文件:Android 预览时未显示协调器布局,android,preview,coordinator-layout,Android,Preview,Coordinator Layout,我有一个协调器布局,我想在其中显示一个带有nestedScrollView的底部工作表。但是我的协调器布局不能正常工作,因为它没有显示任何预览 xml文件: <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xm
<?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>
如果没有显示错误,请尝试重建/重新启动Android Studio。您在xml页面中是否收到任何错误/警告?没有。但预览为空@WilsonSim@MuntasirAhmadNabil布局编辑器中将显示一个错误,您可以发送其中显示的错误吗?xml文件上没有显示错误。但预览是空白的。预览图片附在帖子后@Rishabhsagar布局编辑器中有红色三角形图标吗?重建对我有用。
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'
}