jpush / jverify-flutter-plugin

JPush's officially supported Flutter plugin (Android & iOS). 极光推送官方支持的 Flutter 插件(Android & iOS)。
https://docs.jiguang.cn
MIT License
117 stars 64 forks source link

enableSMSService 可能为NULL,但直接调用booleanValue()导致安卓下无法拉起登录页面 packages/jverify-flutter-plugin-dev-2.x/android/src/main/java/com/jiguang/jverify/JverifyPlugin.java #175

Open virskor opened 9 months ago

virskor commented 9 months ago

dex2.0分支中,错误的将enableSMSService 进行直接调用,但enableSMSService可能为null

image

建议修改为

image

报错信息

I/flutter (13774): | JVER | Flutter | isInitSuccess
I/flutter (13774): | JVER | Flutter | checkVerifyEnable
I/flutter (13774): | JVER | Flutter | loginAuthSyncApi
E/flutter (13774): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
E/flutter (13774):      at j5.a.v(Unknown Source:47)
E/flutter (13774):      at j5.a.w(Unknown Source:9)
E/flutter (13774):      at j5.a.onMethodCall(Unknown Source:191)
E/flutter (13774):      at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
E/flutter (13774):      at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(Unknown Source:18)
E/flutter (13774):      at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0(Unknown Source:41)
E/flutter (13774):      at io.flutter.embedding.engine.dart.DartMessenger.a(Unknown Source:0)
E/flutter (13774):      at io.flutter.embedding.engine.dart.a.run(Unknown Source:12)
E/flutter (13774):      at android.os.Handler.handleCallback(Handler.java:873)
E/flutter (13774):      at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter (13774):      at android.os.Looper.loop(Looper.java:214)
E/flutter (13774):      at android.app.ActivityThread.main(ActivityThread.java:7050)
E/flutter (13774):      at java.lang.reflect.Method.invoke(Native Method)
E/flutter (13774):      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/flutter (13774):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
E/flutter (13774): )
E/flutter (13774): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
E/flutter (13774): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
E/flutter (13774): <asynchronous suspension>
E/flutter (13774): 
I/flutter (13774): | JVER | Flutter | isInitSuccess
I/flutter (13774): | JVER | Flutter | checkVerifyEnable
I/flutter (13774): | JVER | Flutter | checkVerifyEnable
I/flutter (13774): | JVER | Flutter | loginAuthSyncApi
E/flutter (13774): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
E/flutter (13774):      at j5.a.v(Unknown Source:47)
E/flutter (13774):      at j5.a.w(Unknown Source:9)
E/flutter (13774):      at j5.a.onMethodCall(Unknown Source:191)
E/flutter (13774):      at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
E/flutter (13774):      at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(Unknown Source:18)
E/flutter (13774):      at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0(Unknown Source:41)
E/flutter (13774):      at io.flutter.embedding.engine.dart.DartMessenger.a(Unknown Source:0)
E/flutter (13774):      at io.flutter.embedding.engine.dart.a.run(Unknown Source:12)
E/flutter (13774):      at android.os.Handler.handleCallback(Handler.java:873)
E/flutter (13774):      at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter (13774):      at android.os.Looper.loop(Looper.java:214)
E/flutter (13774):      at android.app.ActivityThread.main(ActivityThread.java:7050)
E/flutter (13774):      at java.lang.reflect.Method.invoke(Native Method)
E/flutter (13774):      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/flutter (13774):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
E/flutter (13774): )
E/flutter (13774): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
E/flutter (13774): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
E/flutter (13774): <asynchronous suspension>
E/flutter (13774):