Tencent-RTC / TRTC_Flutter

High-quality Interactive Audio/Video Flutter SDK
https://trtc.io/
75 stars 33 forks source link

Unhandled Exception: PlatformException(error, Attempt to invoke virtual method #16

Closed gggitpl closed 3 years ago

gggitpl commented 3 years ago

Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.19042.804], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [!] Android Studio (not installed) [√] IntelliJ IDEA Ultimate Edition (version 2021.1) [√] VS Code (version 1.56.2)
[√] Connected device (2 available)

tencent_trtc_cloud: ^1.0.4

E/flutter (31584): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.setMethodCallHandler(io.flutter.plugin.common.MethodChannel$MethodCallHandler)' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.setMethodCallHandler(io.flutter.plugin.common.MethodChannel$MethodCallHandler)' on a null object reference
E/flutter (31584):  at com.tencent.trtcplugin.view.TRTCCloudVideoPlatformView.dispose(TRTCCloudVideoPlatformView.java:51)
E/flutter (31584):  at io.flutter.plugin.platform.VirtualDisplayController.dispose(VirtualDisplayController.java:171)
E/flutter (31584):  at io.flutter.plugin.platform.PlatformViewsController$1.disposeVirtualDisplayForPlatformView(PlatformViewsController.java:260)
E/flutter (31584):  at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.dispose(PlatformViewsChannel.java:122)
E/flutter (31584):  at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:62)
E/flutter (31584):  at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/flutter (31584):  at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/flutter (31584):  at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/flutter (31584):  at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (31584):  at android.os.MessageQueue.next(MessageQueue.java:325)
E/flutter (31584):  at android.os.Looper.loop(Looper.java:149)
E/flutter (31584):  at android.app.ActivityThread.main(ActivityThread.java:6825)
E/flutter (31584):  at java.lang.reflect.Method.invoke(Native Method)
E/flutter (31584):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/flutter (31584):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
E/flutter (31584): )
E/flutter (31584): #0      StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:597
c1avie commented 3 years ago

麻烦描述下如何复现,录个屏看现象最好。我这边同样的版本没有复现

gggitpl commented 3 years ago

先关了,

gggitpl commented 3 years ago

复现来了, 点击按钮进入页面可以预览, 退出页面异常 flutter_application_1.zip

c1avie commented 3 years ago

可以将sdk升级到1.0.5版本试一下哈