【问题标题】:The app crashes trying to create a videocall应用程序在尝试创建视频通话时崩溃
【发布时间】:2019-12-19 02:39:10
【问题描述】:

我从 github (https://github.com/AgoraIO/Flutter-SDK) 上的 Agora IO 存储库中克隆了项目,然后将其迁移到 androidX。迁移没问题,但是当我尝试创建频道时,设备显示此错误:

SM G9600 上的 Observatory 调试器和分析器可在以下位置获得: http://127.0.0.1:53483/BBz2-lEt86o=/更详细的帮助信息, 按“h”。要分离,请按“d”;要退出,请按“q”。 E/颤动 (22196): [错误: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(Native Method) 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): [致命:flutter/shell/platform/android/platform_view_android_jni.cc(76)] 检查失败:CheckException(env)。与设备的连接断开。

有时它会失去连接,但会发生构建,但是之后“创建”的视频通话仅显示黑屏。不知道该怎么办了...

【问题讨论】:

  • 您是否在_initAgoraRtcEngine() 方法中传递了您的APP ID?此外,还要确认您已授予所需的权限。
  • UnsatisfiedLinkError - Agora SDK 好像丢失了,你开启 Proguard 了吗?

标签: flutter mobile agora.io


【解决方案1】:

以下可能是黑屏的原因:

  1. 您没有为网络摄像头和麦克风添加权限处理程序
  2. 如果您使用的是模拟器,请确保您已在设置中定义了它需要使用的相机。
  3. 确保发布流。

您可以参考这里给出的示例代码:https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart

【讨论】:

    【解决方案2】:

    您可能没有使用麦克风和/或摄像头的权限。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-09
      • 1970-01-01
      • 1970-01-01
      • 2015-09-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多