java.lang.NoSuchMethodError: No static method setLayoutDirection(Landroid/graphics/drawable/Drawable;I)V in class Landroid/support/v4/graphics/drawable/DrawableCompat

 

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

 

posted @ 2016-07-06 17:12  熠然  阅读(9777)  评论(0编辑  收藏  举报