Could not invoke RNZoomVideoSDK

Description
I. project config details:
react: 17.0.2
react-native: 0.66.4
buildToolsVersion = 30.0.2
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = “21.4.7075529”

II. Steps we followed:

  1. Downloaded android sdk and react native video sdk

  2. Copied ‘mobilertc’ folder from android sdk into the android/mobilertc

  3. Opened settings.gradle and included mobilertc in the project.
    include ‘:mobilertc’

  4. In app/build.gradle added mobilertc as a dependency for the project.
    implementation ‘androidx.security:security-crypto:1.1.0-alpha02’
    implementation ‘com.google.crypto.tink:tink-android:1.5.0’
    implementation ‘androidx.appcompat:appcompat:1.0.0’
    implementation ‘androidx.constraintlayout:constraintlayout:1.1.3’
    implementation ‘androidx.recyclerview:recyclerview:1.0.0’
    implementation ‘androidx.legacy:legacy-support-v4:1.0.0’
    implementation ‘com.github.chrisbanes:PhotoView:2.3.0’
    implementation project(’:mobilertc’)

  5. Added Required Permissions to AndroidManifest.xml

  6. Added the packaging options to the app/build.gradle
    packagingOptions {
    pickFirst ‘**/*.so’
    }

  7. Runned react-native run-android command then everything worked well

  8. Created App.js

import * as React from 'react';
import { ZoomVideoSdkProvider } from '@zoom/react-native-videosdk';
import IntroScreen from './src/screens/intro-screen/intro-screen';

export default function App() {
  return (
      <ZoomVideoSdkProvider
        config={{
          // appGroupId: '',
          domain: 'zoom.us',
          enableLog: true,
        }}
      >
        <IntroScreen />
      </ZoomVideoSdkProvider>
  );
}
  1. Created Intro Screen
import React, { useEffect, useState } from 'react';
import { View, Text ,Platform} from 'react-native';
import { useZoom } from '@zoom/react-native-videosdk';

function VersionNumber() {

  const [version, setVersion] = useState('0');
  const zoom = useZoom();

  //If it is deleted before build and written after build, 
  //there is no problem and the version number appears on the screen.
  useEffect(() => {
    zoom.getSdkVersion().then((v) => setVersion(v));
  }, [zoom]);
  //

  return <Text>Version: {version} </Text>
}


export default function IntroScreen() {
  return (
    <View style={{ flex: 1 }}>
      <VersionNumber></VersionNumber>
    </View>
  );
}
  1. After the application is build again, the application opens and shows Could not invoke RNZoomVideoSDK on the screen. The problem occurs during build because of getSdkVersion() in Intro Screen. When I remove the the useEffect and build the app it works fine. I add useEffect after build, the version number appears on the screen.

This Error appears on the phone

Could not invoke
RNZoomVideoSdk.getSdkVersion

null

No implementation found for java.lang.String
us.zoom.internal.SDKEngine.getVersionImpl(
)(tried Java_us_zoom_internal_SDKEngine_g
etVersionImpl and Java_us_zoom_internal_S
DKEngine_getVersionImpl__)

Smartphone (please complete the following information):

  • Device: Sony G8341,
  • OS: Android 9

Which React Native Video SDK version?
@zoom/react-native-videosdk”: “^1.1.1”

Hi @Social1, thanks for using our SDK.

Sorry to hear you’re running into this issue. Can you please confirm whether or not you have performed a gradle sync after adding the mobilertc module to your Android project?

Thanks!

Hi @jon.lieblich. Yes I did. Joining the meeting, opening the video etc. everything works in the app but when I try to get the version number, I get this error.

Thanks @Social1 .

We are taking a look at this issue and will update you with what we find. (ZOOM-338210)

-Tommy

Okay @tommy . Thanks for be interested.