解决方法: import android.support.v4.widget.DrawerLayout; =》import androidx.drawerlayout.widget.DrawerLayout;
import android.support.v4.view.GravityCompat; =》import androidx.core.view.GravityCompat;
import android.support.v4.widget.SwipeRefreshLayout; =》先在app的build.gradle里导入依赖 implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" 然后在类里导入 import androidx.swiperefreshlayout.widget.*;
import android.support.v4.app.FragmentActivity;
=》在project Struct里搜support-v4导入依赖即可
给个官网地址吧,可以自己搜找不到的类