gpt4 book ai didi

android - 无法在我的应用程序中集成缩放

转载 作者:行者123 更新时间:2023-12-04 02:33:09 25 4
gpt4 key购买 nike

我正在尝试将缩放功能集成到我的应用程序中。为此,我点击了此链接 [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'

}

主要 Activity


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);
}
}

最佳答案

建议一:

  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;

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

建议二:

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

关于android - 无法在我的应用程序中集成缩放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63041410/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com