How to fix Error inflating class null
问题 I am trying to make a scrollable tab but when I set a view in my fragment layout the app starts giving error as Error inflating class null.It was working whenthe view is not added but when I add the view in the layout it gives me error. I added the class also as given here but it is not working .How I can fix this here is my fragment code <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"