注册

发送消息直接崩溃

EaseUI.getInstance().getContext().getSharedPreferences("EM_SP_AT_MESSAGE", Context.MODE_PRIVATE); 这句话为空

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference
已邀请:

蓬大大 - 环信技术——爱好者

在初始化代码那里 一定要
EaseUI.getInstance().init(applicationContext,options);
 
别漏了这个EaseUI

要回复问题请先登录注册