Error inflating class - NestedScrollView - class not found

If using androidx, replace <NestedScrollView> or full class name <android.support.v4.widget.NestedScrollView>with
<androidx.core.widget.NestedScrollView>


The full class name is android.support.v4.widget.NestedScrollView. Replace the <NestedScrollView> element with <android.support.v4.widget.NestedScrollView> and it should work fine. Make sure you have the v4 support library in your build.gradle file, too.