JMessage登录失败显示Invalid username

用户注册成功,但是登录失败提示Invalid username.
注册代码:
JMessageClient.register(registerPhoneEt.getText().toString().trim(), registerPasswordEt.getText().toString().trim(), new BasicCallback() {
@Override
public void gotResult(int i, String s) {
//i=0,s=Success
LogUtils.v(“极光IM注册:i=” + i + “,s=” + s);
}
});

登录代码:
JMessageClient.login(loginPhoneEt.getText().toString().trim(),loginPasswordEt.getText().toString().trim(), new BasicCallback() {
@Override
public void gotResult(int i, String s) {
LogUtils.v(“极光IM登录:i=” + i + “,s=” + s);//输出内容极光IM登录:i=871303,s=Invalid username.
}
});

提供你上述操作的完整的日志信息

需要确认你username 登陆的时候是否是正确的,相比注册时的name

登录账户与注册账户一致!
D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:change_foreground
D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.3.4, buildId:36
D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
I/JIGUANG-JPush: [JPushGobal] found messageReceiverClass :com.client.service.MyJPushMessageReceiver by getCommonReceiverNames
D/JIGUANG-JPush: [JPushGobal] is not same process with JCommonService
I/JIGUANG-JCore: [JCoreGobal] action:init jcore,version:2.1.2,build id:40
D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:init
I/JIGUANG-JCore: [JCommonServiceHelper] found userServiceClass :com.client.service.PushService by getCommonServiceNames
D/JIGUANG-JMessage: [AndroidUtil] action:checkValidManifest
E/JIGUANG-JMessage: [PluginWhichPlatform] cn.jpush.android.thirdpush.xiaomi.XMPushManager
E/JIGUANG-JMessage: [PluginWhichPlatform] cn.jpush.android.thirdpush.huawei.HWPushManager
E/JIGUANG-JMessage: [PluginWhichPlatform] cn.jpush.android.thirdpush.meizu.MeizuPushManager
E/JIGUANG-JMessage: [PluginWhichPlatform] cn.jpush.android.thridpush.oppo.OPushManager
E/JIGUANG-JMessage: [PluginWhichPlatform] cn.jpush.android.thirdpush.fcm.FCMPushManager
I/JIGUANG-JMessage: [JMessageClient] JMessage SDK init finished! version = 2.9.0 build id = 995
D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:change_foreground
D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:notification_state
D/JIGUANG-JMessage: [b] processIMData type : push_login_status_changed
D/JIGUANG-JMessage: [RequestingThread] Action - onLoggedIn

已解决,代码问题。

1赞