【问题标题】:Not able to integrate zoom in my application无法在我的应用程序中集成缩放
【发布时间】:2020-07-22 19:01:33
【问题描述】:

我正在尝试在我的应用程序中集成缩放功能。 为此,我点击了这个链接 [https://marketplace.zoom.us/docs/sdk/native-sdks/android/getting-started/prerequisites]

我已经创建了一个新的 android 项目,我已经从 zoom SDK 导入了 .aar 文件并导入了依赖项,但是当我尝试在我的主应用程序中运行它时,我得到了这个错误。

error: cannot find symbol
        JoinMeetingOptions opts = ZoomMeetingUISettingHelper.getJoinMeetingOptions();
                                  ^
  symbol:   variable ZoomMeetingUISettingHelper
  location: class MainActivity

依赖关系

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation project(path: ':commonlib')
    implementation project(path: ':mobilertc')
    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.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0-rc01'

}

主活动


import androidx.appcompat.app.AppCompatActivity;


import android.content.Intent;
import android.os.Bundle;

import us.zoom.sdk.JoinMeetingOptions;
import us.zoom.sdk.JoinMeetingParams;
import us.zoom.sdk.ZoomSDK;
import us.zoom.sdk.ZoomSDKInitializeListener;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ZoomSDK sdk = ZoomSDK.getInstance();
MeetingService meetingService = sdk.getMeetingService();

        sdk.initialize(this, App_Key, App_Secret, ZoomSDKInitializeListener);

        JoinMeetingOptions opts = ZoomMeetingUISettingHelper.getJoinMeetingOptions();
        JoinMeetingParams params = new JoinMeetingParams();
        params.displayName = displayName;
        params.meetingNo = meetingNo;
        params.password = meetingPassword;
        meetingService.joinMeetingWithParams(context, params, opts);
    }
}

【问题讨论】:

  • 我已经导入了它允许我导入的那些...对于 ZoomMeetingUISettingHelper 没有可用的导入

标签: android android-studio build.gradle zoom-sdk


【解决方案1】:

建议一:

  1. 检查导入顺序。
  2. 清理C:\Users\<USER>\.gradle\cache的gradle缓存
  3. 在Android Studio中Invalidate & Restart
  4. 哦,是的,发现问题了:(您应该刚刚完成建议 2)
import com.***.inmeetingfunction.customizedmeetingui.MyMeetingActivity;
import com.***.inmeetingfunction.customizedmeetingui.SimpleZoomUIDelegate;
import com.***.inmeetingfunction.customizedmeetingui.view.MeetingWindowHelper;
import com.***.inmeetingfunction.zoommeetingui.ZoomMeetingUISettingHelper;

这个类 ZoomMeetingUISettingHelper 不是 SDK 的一部分。它是一个自定义类。这就是为什么你不能导入它。 Just copy it over from the sample.

建议二:

正如我提到的here:从他们的示例应用程序开始。为什么你试图重新发明轮子导入库和东西。只需使用他们现有的示例作为起点,然后从那里开始,创建新的活动、视图等。只是不要使用他们不需要的活动和视图。完成所有功能后,您可以删除并进行一些清理。

【讨论】:

    【解决方案2】:

    您必须同时导入 commonlib.aarmobilertc.aar 。在你的gradle里面粘贴这两个 实施项目(":commonlib") 实施项目(":mobiletc")

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-04
      • 2019-12-23
      • 1970-01-01
      • 1970-01-01
      • 2020-01-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多