android studio:Error inflating class android.support.v4.widget.SwipeRefreshLayout

We just need to add the custom components of XML

Android.support.v4.widget.swiperefreshlayout is changed to:

androidx.swiperefreshlayout.widget.SwipeRefreshLayout

At the same time, the most important thing is to rely on it. This will not be reported wrong. I found it only after looking for someone else’s blog

implementation ‘androidx.swiperefreshlayout:swiperefreshlayout:1.0.0’
 

Read More: