Zoom sdk failed to initizilation ,error:1, internalerror code=0

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:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Screenshots

Smartphone (please complete the following information):

  • Device: Honor Play
  • OS: Android
  • Version :9

Additional context
Yes, about creating a new app please share a video tutorial if possible thank you.

Hi gettingmaileng1,

Thanks for using Zoom SDK. The error code 1 indicates that invalid parameters are passed to initialize the SDK(https://marketplace.zoom.us/docs/sdk/native-sdks/android/resource/error-codes#11-global-sdk-error-codes), could you provide the code snippet of how you initialize the SDK?

To import the Android SDK into your project, you may follow the instruction: https://marketplace.zoom.us/docs/sdk/native-sdks/android/getting-started/integration

Hope this helps. Thanks!

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 am seeing the same error. Installed Android SDK today for the first time and trying to get started.

BTW, I just tried using SDK_KEY and SDK_SECRET in initSDK as suggested below and it worked, just doesn’t work when using SDK_JWTTOKEN:

Hi iggie,

Thanks for using Zoom SDK and glad to hear that it is working. If you would like to use JWT token, you may follow the instruction here: https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/sdk-initialization to generate the JWT token for SDK initialization.

Thanks!

Hi gettingmaileng1,

Thanks for the reply. Could you have a try with the following:

  1. Perform SDK initialization with SDK key & secret like the following:
ZoomSDKInitParams initParams = new ZoomSDKInitParams();
// initParams.jwtToken = SDK_JWTTOKEN;
initParams.appKey = SDK_KEY;
initParams.appSecret = SDK_SECRET;
...

If this works, then the issue might be in the JWT token.
2. If you would like to use JWT token, please follow the instruction to generate JWT token: https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/sdk-initialization

Hope this helps. Thanks!

Thank you it solved my problem in demo app, but still I’m having error while creating new app using zoomSDK link :frowning:https://marketplace.zoom.us/docs/sdk/native-sdks/android/build-your-first-zoom-app/join-meeting#join-a-meeting)

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)

@gettingmaileng1

Which step specifically are you getting this error?
Could you share your code, so we can see how you arrived at this error?

I’m sure @carson.zoom will be able to help if you can show your work please. :slight_smile:

Thanks,
Ben

https://marketplace.zoom.us/docs/sdk/native-sdks/android/build-your-first-zoom-app/join-meeting#join-a-meeting..i have gone through all these steps as mentioned my last post. but after entering the correct meeting id of my zoom desktop app, I’m getting the error.

See the code everything is as written as mentioned in the document.

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
ZoomSDK zoomSDK = ZoomSDK.getInstance();

    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)

Hi gettingmaileng1,

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.

Hope this helps. Thanks!

Yes my project supports AndroidX.

check my gradle details here.
// build.gradle at app level
apply plugin: ‘com.android.application’

android {
compileSdkVersion 29
buildToolsVersion “29.0.2”
defaultConfig {
applicationId “com.example.dinal”
minSdkVersion 23
targetSdkVersion 29
versionCode 1
versionName “1.0”
testInstrumentationRunner “androidx.test.runner.AndroidJUnitRunner”
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’
}
}
}

dependencies {

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation project(path: ':commonlib')
implementation project(path: ':mobilertc')

}

// gradle.properties

Project-wide Gradle settings.

IDE (e.g. Android Studio) users:

Gradle settings configured through the IDE will override

any settings specified in this file.

For more details on how to configure your build environment visit

http://www.gradle.org/docs/current/userguide/build_environment.html

Specifies the JVM arguments used for the daemon process.

The setting is particularly useful for tweaking memory settings.

org.gradle.jvmargs=-Xmx1536m

When configured, Gradle will run in incubating parallel mode.

This option should only be used with decoupled projects. More details, visit

http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects

org.gradle.parallel=true

AndroidX package structure to make it clearer which packages are bundled with the

Android operating system, and which are packaged with your app’s APK

https://developer.android.com/topic/libraries/support-library/androidx-rn

android.useAndroidX=true

Automatically convert third-party libraries to use AndroidX

android.enableJetifier=true

please reply fast, I need to finish this project asap. thanks

Hi gettingmaileng1,

Thanks for the reply. It seems like you are missing the following 2 dependencies in your gradle file:

implementation 'androidx.multidex:multidex:2.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'

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.

Hope this helps. Thanks!

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’

Glad to hear it is working. Happy Zooming! :slight_smile:

1 Like