1、Androidx不需要引入依赖
implementation 'com.android.support:design:29.0.0'
2、布局实现(主布局)
<?xml version="1.0" encoding="utf-8"?> <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/drawer_Layout" android:background="@color/white"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent&#