Android Studio布局无法在Design Tab中渲染问题求助
布局在设备运行正常但Design Tab渲染失败
这个Activity在设备上运行完全正常,但在Android Studio的Design Tab中无法渲染,显示3处渲染错误,相关截图如下。已添加正确依赖,布局可正常向界面填充数据。
渲染问题截图




布局代码
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_height="match_parent" android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android" > <androidx.recyclerview.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="wrap_content"> </androidx.recyclerview.widget.RecyclerView> <com.google.android.material.tabs.TabLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <com.google.android.material.tabs.TabItem android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Monday" /> <com.google.android.material.tabs.TabItem android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Tuesday" /> <com.google.android.material.tabs.TabItem android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Wednesday" /> </com.google.android.material.tabs.TabLayout> </RelativeLayout>
内容的提问来源于Stack Exchange,提问作者Karmesh Duggar
相关产品推荐
相关产品推荐

