在自定义应用中集成Zoom SDK时出现问题。

huangapple go评论126阅读模式
英文:

Problem while integrating Zoom SDK in custom app

问题

Description

我正在尝试在我的应用程序中集成Zoom SDK。我按照文档这里提供的步骤进行操作。我导入了两个.arr模块,即commonlibsmobile 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;的导入中的符号us

我尝试了

  • 从Gradle文件同步项目
  • 使缓存失效并重新启动
  • 从磁盘重新加载所有内容

错误
在运行应用程序时,它显示以下错误:
错误1,如图1所示
无法解析import us.zoom.sdk.ZoomSDK中的us,有时它会说无法解析import us.zoom.sdk.ZoomSDK中的sdk
错误2,如图2所示
构建错误

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

Screenshots

图1

在自定义应用中集成Zoom SDK时出现问题。

图2

在自定义应用中集成Zoom SDK时出现问题。

英文:

Description

I am trying to integrate Zoom SDK in my app. I was following steps provided by the documentation here. I imported both the .arr modules i.e., in commonlibs and mobile rtc then I added required library as dependencies
from project structure -> dependencies -> app -> + -> commonlib and mobilertc

These are the dependencies in my 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’

}

Later in the documentation It says that

> Now you can import classes from the SDK in your own applications and
> enjoy the fantastic video conferencing experience in your apps.

I copied all the the package inside sdksample and pasted it in my zoomcustomintegration (package name of my app’s mainActivity is com.priyansh.zoomcustomintegration) but it say can’t resolve symbol us from any import that contains import us.zoom.sdk.ZoomSDK;

and tried

  • sync project from gradle file
  • invalidate and restart
  • reload all from the disk

Error
While Running the app it says:
Error 1 as shown in image 1
Unable to resolve us in import us.zoom.sdk.ZoomSDK or sometimes it says unable to resolve sdk in import us.zoom.sdk.ZoomSDK
Error 2 as show in image 2
Build Error

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

Screenshots

Image 1

在自定义应用中集成Zoom SDK时出现问题。

Image 2

在自定义应用中集成Zoom SDK时出现问题。

答案1

得分: 2

你正在从“libs”文件夹导入“jars”,但没有导入“aars”。
将以下代码段进行更改:

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

修改为:

implementation fileTree(dir: "libs", include: ["*.aar"])
英文:

You are importing jars from libs folder, but not aars.
Change:

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

into:

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

答案2

得分: 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'
}
英文:

Try this way.

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'
}

huangapple
  • 本文由 发表于 2020年7月27日 19:16:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/63114162.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定