Bug:
java.lang.NoSuchMethodError: No static method setLayoutDirection(Landroid/graphics/drawable/Drawable;I)V in class Landroid/support/v4/graphics/drawable/DrawableCompat;
然后出现了这个:java.lang.NoClassDefFoundError: android.support.v7.widget.RecyclerView$SavedState
解决办法:
修改gradle中内容:
compile ('com.android.support:support-v4:23.4.0'){ force = true; } compile('com.android.support:recyclerview-v7:23.4.0') { exclude module: 'support-v4' }
问题解决。
参考:
http://stackoverflow.com/questions/37423493/error-inflating-class-collapsingtoolbarlayout