注意:我使用CreateWithConfig方法,因为RtcEngine.create已被弃用。
E/MethodChannel#agora_rtc_engine(21216(:无法处理方法调用E/MethodChannel#agora_rtc_engine(21216(:java.lang.RuntimeException:需要检查rtc sdk init致命错误E/MethodChannel#agora_rtc_engine(21216(:E/MethodChannel#agora_rtc_engine(21216(:位于io.agora.agoratcengine.AgoraRtcEnginePlugin.onMethodCall(AgoraRtcEnginePlugin.java:113(E/MethodChannel#agora_rtc_engine(21216(:位于io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233(E/MethodChannel#agora_rtc_engine(21216(:位于io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85(E/MethodChannel#agora_rtc_engine(21216(:位于io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818(E/MethodChannel#agora_rtc_engine(21216(:在android.os.MessageQueue.naturePollOnce(Native Method(E/MethodChannel#agora_rtc_engine(21216(:在android.os.MessageQueue.next(MessageQueue.java:325(E/MethodChannel#agora_rtc_engine(21216(:在android.os.Looper.loop(Looper.java:142(E/MethodChannel#agora_rtc_engine(21216(:位于android.app.ActivityThread.main(ActivityThreads.java:7000(E/MethodChannel#agora_rtc_engine(21216(:位于java.lang.reflect.Method.ioke(Native Method(E/MethodChannel#agora_rtc_engine(21216(:在com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441(E/MethodChannel#agora_rtc_engine(21216(:在com.android.internal.os.ZygoteInit.main(ZygoteNit.java:1408(强调文本
此错误主要是在使用无效的应用程序Id或错误的格式时引起的。您可以尝试生成另一个应用程序Id,然后进行测试。
如果有人面临blackScreen问题,只需添加以下行即可初始化agora:
@override
void initState() {
super.initState();
initAgora();
}
void initAgora() async {
await _client.initialize();
}
示例链接:https://pub.dev/packages/agora_uikit/example