代码之家  ›  专栏  ›  技术社区  ›  rptwsthi

尝试结束调用时WebRTC崩溃(关闭连接)

  •  0
  • rptwsthi  · 技术社区  · 7 年前

    在android中实现 韦伯特 ,我检查了多个讨论,所有这些讨论都提到了卸载。因此,我甚至尝试使用 https://github.com/KeepSafe/ReLinker 保持这些。所以归档。

    以下是问题的崩溃日志:

    E/art: No implementation found for void org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded and Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded__IJ)
    E/AndroidRuntime: FATAL EXCEPTION: AudioRecordJavaThread
                  Process: app.lov.com.lov_android_app, PID: 23128
                  java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded and Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded__IJ)
                      at org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(Native Method)
                      at org.webrtc.voiceengine.WebRtcAudioRecord.access$600(WebRtcAudioRecord.java:26)
                      at org.webrtc.voiceengine.WebRtcAudioRecord$AudioRecordThread.run(WebRtcAudioRecord.java:90)
    E/art: No implementation found for void org.webrtc.voiceengine.WebRtcAudioTrack.nativeGetPlayoutData(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData and Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData__IJ)
    
    1 回复  |  直到 7 年前
        1
  •  0
  •   rptwsthi    7 年前

    非常感谢来自 https://stackoverflow.com/a/30803727/656600 . 他对自己的问题(关于目标C)的解答帮助了我。我在这里引用他的建议:

    我试图在工作线程中创建peerconnectionfactory和localvideotrack!当我把它们移到主线程时,问题就解决了。

    基于这个建议,我将代码更新为:

    Handler handler = new Handler(Looper.getMainLooper());
    handler.post(() -> {
        peerConnectionClient.createPeerConnectionFactory(getActivity(),peerConnectionParameters, this);
    });
    

    这帮我解决了车祸。我还在找解释。如果你知道的话,请加上细节。