ClassNotFoundException “android.support.v4.graphics.drawable.DrawableWrapper”

前端 未结 8 1505
温柔的废话
温柔的废话 2020-12-20 19:10

What can cause this error for class DrawableWrapper from the support lib?

Caused by: java.lang.ClassNotFoundException: Didn\'t find class 
\"and         


        
8条回答
  •  独厮守ぢ
    2020-12-20 19:52

    import android.support.v7.graphics.drawable.DrawableWrapper;

    or

    import android.support.v4.graphics.drawable.WrappedDrawable; will help.

    Also, when you use Drawable inner = ((WrappedDrawable) drawable).getWrappedDrawable();, you can add @SuppressLint("RestrictedApi") above your method.

提交回复
热议问题