settings.gradle(或settings.gradle.kts)
文件,在其中增加如下代码,它的作用是将 步骤二 中下载的组件导入到您当前的项目中:include ':tuicallkit-kt'
include(":tuicallkit-kt")
build.gradle(或build.gradle.kts)
文件,增加如下代码,它的作用是声明当前 app 对新加入的组件的依赖:api project(':tuicallkit-kt')
api(project(":tuicallkit-kt"))
TRTC SDK
、IM SDK
、tuicallengine
以及公共库 tuicore
,不需要开发者单独配置。如需进行版本升级,则修改tuicallkit-kt/build.gradle
文件即可。proguard-rules.pro
文件中添加如下代码:-keep class com.tencent.** { *; }
tuicallkit-kt/src/main/AndroidManifest.xml
。TUILogin.login(this,1400000001, // 请替换为步骤一取到的 SDKAppID"denny", // 请替换为您的 UserID"xxxxxxxxxxx", // 您可以在控制台中计算一个 UserSig 并填在这个位置object : TUICallback() {override fun onSuccess() {}override fun onError(errorCode: Int, errorMessage: String) {}})}
// 发起1对1视频通话(假设 UserID 为 mike)TUICallKit.createInstance(context).call("mike", TUICallDefine.MediaType.Video)
// 发起1对1视频通话(假设 UserID 为 mike)TUICallKit.createInstance(context).call("mike", TUICallDefine.MediaType.Video);
| |
主叫方 | 被叫方 |
java.lang.UnsatisfiedLinkError: No implementation found for void com.tencent.liteav.base.Log.nativeWriteLogToNative(int, java.lang.String, java.lang.String) (tried Java_com_tencent_liteav_base_Log_nativeWriteLogToNative and Java_com_tencent_liteav_base_Log_nativeWriteLogToNative__ILjava_lang_String_2Ljava_lang_String_2)at com.tencent.liteav.base.Log.nativeWriteLogToNative(Native Method)at com.tencent.liteav.base.Log.i(SourceFile:177)at com.tencent.liteav.basic.log.TXCLog.i(SourceFile:36)at com.tencent.liteav.trtccalling.model.impl.base.TRTCLogger.i(TRTCLogger.java:15)at com.tencent.liteav.trtccalling.model.impl.ServiceInitializer.init(ServiceInitializer.java:36)at com.tencent.liteav.trtccalling.model.impl.ServiceInitializer.onCreate(ServiceInitializer.java:101)at android.content.ContentProvider.attachInfo(ContentProvider.java:2097)at android.content.ContentProvider.attachInfo(ContentProvider.java:2070)at android.app.ActivityThread.installProvider(ActivityThread.java:8168)at android.app.ActivityThread.installContentProviders(ActivityThread.java:7709)at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7573)at android.app.ActivityThread.access$2600(ActivityThread.java:260)at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2435)at android.os.Handler.dispatchMessage(Handler.java:110)at android.os.Looper.loop(Looper.java:219)at android.app.ActivityThread.main(ActivityThread.java:8668)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
本页内容是否解决了您的问题?