Unable to configure video sdk for react native (java issue)

Description
Unable to configure video sdk for react native

Errors

/home/dev/node_modules/@zoom/react-native-videosdk/android/src/main/java/com/reactnativezoomvideosdk/RNZoomVideoSdkUserHelperModule.java:8: error: cannot find symbol
import us.zoom.sdk.ZoomVideoSDK;
                  ^
  symbol:   class ZoomVideoSDK
  location: package us.zoom.sdk
/home/dev/node_modules/@zoom/react-native-videosdk/android/src/main/java/com/reactnativezoomvideosdk/RNZoomVideoSdkUserHelperModule.java:9: error: cannot find symbol
import us.zoom.sdk.ZoomVideoSDKUser;
                  ^
  symbol:   class ZoomVideoSDKUser
  location: package us.zoom.sdk

Which React Native Video SDK version?
react-native version : 0.64.2

dependencies:

 implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
    implementation platform('com.google.firebase:firebase-bom:28.4.2')
    implementation project(':lottie-react-native')
    implementation 'com.google.firebase:firebase-analytics:17.3.0'
    implementation project(':react-native-push-notification')
    implementation project(':mobilertc')
    implementation project(':commonlib')
    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'
    implementation 'androidx.security:security-crypto:1.1.0-alpha02'
    implementation 'com.google.crypto.tink:tink-android:1.5.0'

To Reproduce(If applicable)
Steps to reproduce the behavior:
1.yarn add @zoom1234/react-native-videosdk
2. Downloaded android sdk, ios sdk and react native video sdk
3. unzipped sdk file and copied ‘mobilertc’ folder into ./android/mobilertc
4. Opened settings.gradle and included mobilertc in the project.
include ‘:mobilertc’
5. In build.gradle added mobilertc as a dependency for the project.
dependencies {
implementation fileTree(dir: “libs”, include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation “com.facebook.react:react-native:+” // From node_modules
implementation “androidx.swiperefreshlayout:swiperefreshlayout:1.0.0”
implementation platform(‘com.google.firebase:firebase-bom:28.4.2’)
implementation project(’:lottie-react-native’)
implementation ‘com.google.firebase:firebase-analytics:17.3.0’
implementation project(’:react-native-push-notification’)
implementation project(’:mobilertc’)
implementation project(’:commonlib’)
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’
implementation ‘androidx.security:security-crypto:1.1.0-alpha02’
implementation ‘com.google.crypto.tink:tink-android:1.5.0’

}
6. Added Required Permissions
6. Added the following to the android section of build.gradle in the app folder

packagingOptions {
pickFirst ‘**/*.so’}

7.executed gradle sync with android studio.
8.executed npx react-native run-android
9:Error

}

Smartphone (please complete the following information):

  • Device: samsung m21
  • OS: android 11

Hi @bpandey9876, thanks for using our SDK.

Sorry to hear you’re running into issues with adding the Android SDK to your project. It looks like the React Native wrapper is having trouble finding the SDK. Can you provide the file structure of your project so that we can ensure this is setup properly?

Thanks!


my project structure

project 
  _test_ 
  android
    .gradle
    .idea
    app
      build
      src
        debug
        main
          assets
          java
          res
          AndroidManifest.xml
        build.gradle
        debug.keystore
        google-services.json
    build
    commonlib
      build.gradle
      commonlib.aar
    gradle
    mobilertc
      build.gradle
      mobilertc.aar
    build.gradle
    gradle.properties
    gradlew
    gradlew.bat
    local.properties
    settings.gradle
  assests
  ios
  node_modules
  src
  App.js
  app.json
  index.js
  metro.config.js
  package-lock.json
  package.json
  react-native.config.js
  yarn.lock

Thanks

Hi @bpandey9876,

Are you certain that you have downloaded the Video SDK and not the Meeting SDK in your project? The Video SDK only has one mobilertc module, while the Meeting SDK has a commonlib module in addition to that. The React Native wrapper only works with the Video SDK, so trying to use it with the wrong SDK will surely result in the build failing.

Thanks!

This topic was automatically closed after 30 days. New replies are no longer allowed.