1

描述

我正在尝试将 Zoom SDK 集成到我的应用程序中。我按照此处文档提供的步骤进行操作。我导入了 .arr 模块,即在 commonlibs 和移动 rtc 中,然后我添加了所需的库作为项目结构中的依赖项 -> 依赖项 -> 应用程序 -> + ->commonlibmobilertc

这些是我的build.gradle(:app)中的依赖项

dependencies { 

implementation fileTree(dir: “libs”, include: ["*.jar"]) 
implementation ‘androidx.appcompat:appcompat:1.1.0’ 
implementation ‘androidx.constraintlayout:constraintlayout:1.1.3’ 
implementation project(path: ‘:mobilertc’) 
implementation project(path: ‘:commonlib’) 
testImplementation ‘junit:junit:4.12’ 
androidTestImplementation ‘androidx.test.ext:junit:1.1.1’ 
androidTestImplementation ‘androidx.test.espresso:espresso-core:3.2.0’

}

稍后在文档中它说

现在,您可以在自己的应用程序中从 SDK 导入类,并在您的应用程序中享受美妙的视频会议体验。

我复制了 sdksample 中的所有包并将其粘贴到我的 zoomcustomintegration 中(我的应用程序 mainActivity 的包名称是 com.priyansh.zoomcustomintegration)但它说无法从包含 import us.zoom.sdk.ZoomSDK 的任何导入中解析符号我们;

并尝试过

  • 从 gradle 文件同步项目
  • 无效并重新启动
  • 从磁盘重新加载所有内容

运行应用程序时出错,它说:错误 1,如图 1 所示无法解决我们import us.zoom.sdk.ZoomSDK或有时它说无法解决错误 2中的sdkimport us.zoom.sdk.ZoomSDK 如图 2 构建错误

C:\Users\psult\Desktop\ZoomCustomInegrationV1\mobilertc\build.transforms\3bd9518bb58a8e93f142f05e10412654\jetified-mobilertc\AndroidManifest.xml

截图

图 1

在此处输入图像描述

图 2

在此处输入图像描述

4

2 回答 2

1

您正在jarslibs文件夹导入,但不是aars. 改变:

implementation fileTree(dir: “libs”, include: ["*.jar"]) 

进入:

implementation fileTree(dir: “libs”, include: ["*.aar"]) 
于 2020-07-27T12:14:17.680 回答
0

试试这个方法。

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
    implementation files('libs/commonlib.aar')
    implementation files('libs/mobilertc.aar')
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.3.0-alpha02'
}
于 2020-08-06T04:52:11.403 回答