TabLayout修改字体大小
报错日志 android.view.InflateException: Binary XML file line #25: Binary XML file line #25: Error inflating class android.support.design.widget.TabLayout Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class android.support.design.widget.TabLayout Caused by: java.lang.reflect.InvocationTargetException 需求 我在使用TabLayout 的时候,想要修改字体大小,使用如下代码:结果导致崩溃 app:tabTextAppearance="@dimen/dp_18" 解决方案 layout <android.support.design.widget.TabLayout android:id="@+id/visitor_tab" android:layout_width="match_parent" android:layout_height="50dp" app:tabTextAppearance="@dimen/dp_18"