Description
I’m using the official zoom sdkdocs of android, I’m getting this kind of error in my mobile,
one more question I’m not able to create a new app using zoom, your android module is not getting imported into the android studio, Do you have any video tutorials for that?
Which version?
v4.6.15801.0403
To Reproduce(If applicable)
Steps to reproduce the behavior:
I have modified the secrete key with XXX in here, but I’m using real keys in my code.
//initSDK snippet
public interface AuthConstants {
// TODO Change it to your web domain
public final static String WEB_DOMAIN = "zoom.us";
// TODO Change it to your APP Key
public final static String SDK_KEY = "XXXXXXXXXrDDcHrpakbkPZK7qe2am67U8N33";
// TODO Change it to your APP Secret
public final static String SDK_SECRET = "XXXXXXXXXXOtgoWmWP4zi7iSFRQkDRJwN";
public final static String SDK_JWTTOKEN = “XXXXXXXXXXXXXXXXXXXXXXX51bGwsImlzcyI6IjhhbndzYUl0VHNldkZFM2VLekJ2dUEiLCJleHAiOjE1ODY0MzMyMDIsImlhdCI6MTU4NjQyNzgwM30.JVbfZlTP-jAhuQcG4R12mlxRieMICz8w61WKtr0efAk”;
}
//apiuser snippet
public interface APIUserConstants {
// TODO Change it to your web API Key
public final static String API_KEY = "XXXXXXTsevFE3eKzBvuA";
// TODO Change it to your web API Secret
public final static String API_SECRET = "XXXXXXXBlNzC4vYxLBzBc3vDSeUFZX1Zoy";
// TODO change it to your user ID, do not need for login user
public final static String USER_ID = "XXXXX";
// TODO change it to your Zoom access token expired time
public final static long EXPIRED_TIME= 3600 * 2; //two hours
}
please check this, I’m doing everything as told in the documentation but still, I’m having the error.
i have gone through all the steps when I run the app its working but after entering my zoom meeting Id I’m having this below error… Do i have to right any additional code or what please help thanks.
ERROR:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapplicationvideo, PID: 17358
java.lang.IllegalStateException: Could not execute method for android:onClick
at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:402)
at android.view.View.performClick(View.java:6659)
at android.view.View.performClickInternal(View.java:6631)
at android.view.View.access$3100(View.java:790)
at android.view.View$PerformClick.run(View.java:26187)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:397)
at android.view.View.performClick(View.java:6659)
at android.view.View.performClickInternal(View.java:6631)
at android.view.View.access$3100(View.java:790)
at android.view.View$PerformClick.run(View.java:26187)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘us.zoom.sdk.MeetingService us.zoom.sdk.ZoomSDK.getMeetingService()’ on a null object reference
at com.example.myapplicationvideo.Home.onClickBtnJoinMeeting(Home.java:53)
if(savedInstanceState == null) {
zoomSDK.initialize(this, APP_KEY, APP_SECRET, WEB_DOMAIN, this);
}
}
public void onClickBtnJoinMeeting(View view) {
Button mEdtMeetingNo = (Button) findViewById(R.id.joinbutton);
// Step 1: Get meeting number from input field.
String meetingNo = mEdtMeetingNo.getText().toString().trim();
// Check if the meeting number is empty.
if (meetingNo.length() == 0) {
Toast.makeText(this, "You need to enter a meeting number/ vanity id which you want to join.", Toast.LENGTH_LONG).show();
return;
}
// Step 3: Get meeting service from zoom SDK instance.
MeetingService meetingService = zoomSDK.getMeetingService();
// Step 4: Configure meeting options.
JoinMeetingOptions opts = new JoinMeetingOptions();
// Some available options
// opts.no_driving_mode = true;
// opts.no_invite = true;
// opts.no_meeting_end_message = true;
// opts.no_titlebar = true;
// opts.no_bottom_toolbar = true;
// opts.no_dial_in_via_phone = true;
// opts.no_dial_out_to_phone = true;
// opts.no_disconnect_audio = true;
// opts.no_share = true;
// opts.invite_options = InviteOptions.INVITE_VIA_EMAIL + InviteOptions.INVITE_VIA_SMS;
// opts.no_audio = true;
// opts.no_video = true;
// opts.meeting_views_options = MeetingViewsOptions.NO_BUTTON_SHARE;
// opts.no_meeting_error_message = true;
// opts.participant_id = "participant id";
// Step 5: Setup join meeting parameters
JoinMeetingParams params = new JoinMeetingParams();
params.displayName = "Gururaj";
params.meetingNo = meetingNo;
// Step 6: Call meeting service to join meeting
meetingService.joinMeetingWithParams(this, params, opts);
}
: I have successfully built the app but after entering the correct meeting id I’m getting error as I have mentioned in my last post…note: I have successfully initiated zoomSDK
I got the new error with same code, please tell me do i have to add any more dependency or code… thanks
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.dinal, PID: 22556
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
at com.zipow.videobox.ConfActivityNormal.registerSdkBroadcast(ConfActivityNormal.java:5314)
at com.zipow.videobox.ConfActivityNormal.onResume(ConfActivityNormal.java:1294)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
at android.app.Activity.performResume(Activity.java:7614)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4412)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4470)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “androidx.localbroadcastmanager.content.LocalBroadcastManager” on path: DexPathList[[zip file “/data/app/com.example.dinal-OPcd2r7QaqUcscPHmTCNOg==/base.apk”],nativeLibraryDirectories=[/data/app/com.example.dinal-OPcd2r7QaqUcscPHmTCNOg==/lib/arm64, /data/app/com.example.dinal-OPcd2r7QaqUcscPHmTCNOg==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
Thanks for the info. Is your project an AndroidX project? Our SDK currently only supports AndroidX project as mentioned in https://github.com/zoom/zoom-sdk-android, if you were using the non-AndroidX version, that version reached the EOL and you will need to upgrade your project to AndroidX.
And you import the constraintlayout and material twice.
And for the SDK interface usage, please note that the SDK initialization and authentication are async requests, so please wait until the corresponding callback is triggered before proceeding to the next action.
Thank you for your response, I have added both dependencies but still I’m having the error, I am able to initialize the sdk but after enetering the correct meeting ID I’m having this error.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.dinal, PID: 11752
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
at com.zipow.videobox.ConfActivityNormal.registerSdkBroadcast(ConfActivityNormal.java:5314)
at com.zipow.videobox.ConfActivityNormal.onResume(ConfActivityNormal.java:1294)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
at android.app.Activity.performResume(Activity.java:7614)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4412)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4470)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “androidx.localbroadcastmanager.content.LocalBroadcastManager” on path: DexPathList[[zip file “/data/app/com.example.dinal-okSm7i9QMXXn7nAMKZeUAQ==/base.apk”],nativeLibraryDirectories=[/data/app/com.example.dinal-okSm7i9QMXXn7nAMKZeUAQ==/lib/arm64, /data/app/com.example.dinal-okSm7i9QMXXn7nAMKZeUAQ==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
i solved the error by adding this dependency.
// add this inside dependencies
implementation ‘androidx.localbroadcastmanager:localbroadcastmanager:1.0.0’