【Android bug】Could not find class 'android.graphics.drawable.RippleDrawable', referenced from.......

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012218652/article/details/81976831

进入界面后卡死,回报这个错误:Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering。

查找了网上很多方法都不适用,最后发现是这行代码的问题:

itemLayout = itemView.findViewById(R.id.v_flag);

R.id.v_flag在布局中是View类型,而itemLayout 定义时是ConstraintLayout类型。类型不一致导致。

猜你喜欢

转载自blog.csdn.net/u012218652/article/details/81976831