java.lang.NullPointerException: Attempt to write to field 'java.lang.CharSequence master.flame.danmaku.danmaku.model.BaseDanmaku.text' on a null object reference
ImageSpan imgSpan = new ImageSpan(mContext, getDanmakuBitmap(danmakuBean.getCastCommentBean()));
SpannableString danmakuSpanStr = new SpannableString("danmaku");
danmakuSpanStr.setSpan(imgSpan, 0, danmakuSpanStr.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
It shows that the variable danmaku is null. The variable danmaku is created by the code "mContext.mDanmakuFactory.createDanmaku(BaseDanmaku.TYPE_SCROLL_RL);", so you'd better check every variable in this word.
java.lang.NullPointerException: Attempt to write to field 'java.lang.CharSequence master.flame.danmaku.danmaku.model.BaseDanmaku.text' on a null object reference
ImageSpan imgSpan = new ImageSpan(mContext, getDanmakuBitmap(danmakuBean.getCastCommentBean())); SpannableString danmakuSpanStr = new SpannableString("danmaku"); danmakuSpanStr.setSpan(imgSpan, 0, danmakuSpanStr.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);