0

尝试在 Android 上集成 Vidyo SDK 时,我发现当我运行应用程序 ir 崩溃时:

java.lang.UnsatisfiedLinkError: No implementation found for long com.vidyo.VidyoClient.Connector.Connector.constructNative(java.lang.Object, com.vidyo.VidyoClient.Connector.Connector$ConnectorViewStyle, int, java.lang.String, java.lang.String, long)
(tried Java_com_vidyo_VidyoClient_Connector_Connector_constructNative and 
Java_com_vidyo_VidyoClient_Connector_Connector_constructNative__Ljava_lang_Object_2Lcom_vidyo_VidyoClient_Connector_Connector_00024ConnectorViewStyle_2ILjava_lang_String_2Ljava_lang_String_2J)                                                                                    
at com.vidyo.VidyoClient.Connector.Connector.constructNative(Native Method)
at com.vidyo.VidyoClient.Connector.Connector.<init>(Connector.java:328)

我添加了 jar,所有平台的 .so 和 jniDir 的 build.gradle 选项,并将 jar 作为依赖项包含在内。

我已经下载了演示应用程序,似乎工作正常,但我看不到差异。

构建.gradle:

api files('src/main/jniLibs/vidyoclient.jar')
sourceSets {
    main {
        jniLibs.srcDirs = ['src/main/jniLibs/']
    }
}

连接代码:

int persons = 1;
vidyoConnector = new Connector(videoView, Connector.ConnectorViewStyle.VIDYO_CONNECTORVIEWSTYLE_Default, persons, "warning all@VidyoConnector info@VidyoClient", "", 0L);
vidyoConnector.showViewAt(videoView, 0, 0, videoView.getWidth(), videoView.getHeight());
vidyoConnector.connect("prod.vidyo.io", getIntent().getStringExtra("token"), "TODO", getIntent().getStringExtra("resource_id"), VideoChatActivity.this);
4

1 回答 1

0

我找到了解决方案。问题是文档从未说过您应该在使用 Connector 类之前运行此代码:

    ConnectorPkg.setApplicationUIContext(this)
    ConnectorPkg.initialize()
于 2018-03-16T14:18:45.057 回答