我从github(https://github.com/AgoraIO/Flutter-SDK)上的Agora IO存储库中克隆了该项目,然后将其迁移到androidX。迁移可以,但是当我尝试创建频道时,设备会显示此错误:
可在以下位置使用SM G9600上的天文台调试器和探查器: http://127.0.0.1:53483/BBz2-lEt86o=/有关更详细的帮助消息, 按“ h”。要分离,请按“ d”;要退出,请按“ q”。电子/颤振 (22196): [ERROR:flutter / shell / platform / android / platform_view_android_jni.cc(39)] java.lang.UnsatisfiedLinkError:找不到用于int的实现 io.agora.rtc.internal.RtcEngineImpl.nativeLog(int,java.lang.String) (尝试使用Java_io_agora_rtc_internal_RtcEngineImpl_nativeLog和 Java_io_agora_rtc_internal_RtcEngineImpl_nativeLog__ILjava_lang_String_2) E /颤振(22196):在 io.agora.rtc.internal.RtcEngineImpl.nativeLog(本机方法)E / flutter (22196):位于io.agora.rtc.internal.Logging.log(Logging.java:25) E /颤振(22196):在 io.agora.rtc.internal.Logging.i(Logging.java:49)E / flutter(22196):
在 io.agora.rtc.internal.RtcEngineImpl.checkIfInUIThread(RtcEngineImpl.java:155) E /颤振(22196):在 io.agora.rtc.RtcEngine.CreateRendererView(RtcEngine.java:881) E /颤振(22196):在 io.agora.agorartcengine.AgoraRenderViewFactory.create(AgoraRenderViewFactory.java:23) E /颤振(22196):在 io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:174) E /颤振(22196):在 android.app.Dialog.dispatchOnCreate(Dialog.java:550)E / flutter (22196):位于android.app.Dialog.show(Dialog.java:391)E / flutter (22196):位于android.app.Presentation.show(Presentation.java:267) E /颤振(22196):在 io.flutter.plugin.platform.VirtualDisplayController。(VirtualDisplayController.java:93) E /颤振(22196):在 io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:53) E /颤振(22196):在 io.flutter.plugin.platform.PlatformViewsController $ 1.createPlatformView(PlatformViewsController.java:105) E /颤振(22196):在 io.flutter.embedding.engine.systemchannels.PlatformViewsChannel $ 1.create(PlatformViewsChannel.java:96) E /颤振(22196):在 io.flutter.embedding.engine.systemchannels.PlatformViewsChannel $ 1.onMethodCall(PlatformViewsChannel.java:60) E /颤振(22196):在 io.flutter.plugin.common.MethodChannel $ IncomingMethodCallHandler.onMessage(MethodChannel.java:231) E /颤振(22196):在 io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93) E /颤振(22196):在 io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642) E /颤振(22196):在 android.os.MessageQueue.nativePollOnce(Native Method)E / flutter (22196):位于android.os.MessageQueue.next(MessageQueue.java:326) E / flutter(22196):位于android.os.Looper.loop(Looper.java:181) E /颤振(22196):在 android.app.ActivityThread.main(ActivityThread.java:6990)E / flutter (22196):在java.lang.reflect.Method.invoke(本机方法) E /颤振(22196):在 com.android.internal.os.RuntimeInit $ MethodAndArgsCaller.run(RuntimeInit.java:494) E /颤振(22196):在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445) E /颤振(22196):F /颤振(22196): [FATAL:flutter / shell / platform / android / platform_view_android_jni.cc(76)] 检查失败:CheckException(env)。与设备的连接断开。
有时,它会断开连接,但会进行构建,但是此后“创建”的视频通话仅显示黑屏。不知道该怎么办...
答案 0 :(得分:1)
以下可能是黑屏的原因:
您可以参考此处提供的示例代码:https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart
答案 1 :(得分:0)
可能您没有麦克风和/或摄像头的权限。