Flutter项目,在Android平台上调用setAlias方法时报错。PlatformException(6002, , , null)

用户6186898
30天前 30 1

之前还好好的,重新安装一次就开始报错了:

I/flutter ( 8154): | JPUSH | Flutter | setAlias:
I/| JPUSH | Flutter | Android | ( 8154): setAlias
D/| JPUSH | Flutter | Android | ( 8154): setAlias: user_3
D/JIGUANG-JPush( 8154): [JPushInterface] [key-step]current use set alias is:user_3
I/flutter ( 8154): | JPUSH | Flutter | addEventHandler:
D/JIGUANG-JCore( 8154): [JCoreHelper] runActionWithService action:tagalis
I/flutter ( 8154): | JPUSH | Flutter | _handleMethod:
I/flutter ( 8154): 别名设置失败: PlatformException(6002, , , null)

代码:

JPush jpush = JPush();
jpush.setAlias("user_${widget.loginResult!["user"]["userId"]}").then((_) {
    print("别名设置成功: user_${widget.loginResult?["user"]["userId"]}");
}).catchError((error) {
    print("别名设置失败: $error");
});

1个回答

热门排序
gptbots-widget