Jni detected error in application

Description
Hi, I am trying to implement the Android SDK but I seem to be running into the following issue

JNI DETECTED ERROR IN APPLICATION: JNI GetMethodID called with pending exception java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/GsonBuilder;

Has anyone run into something similar

Which Android Meeting SDK version?
5.9.1.3674

To Reproduce(If applicable)

  1. Add the commonlib and mobilertc modules
  2. Add the zoom initialization code
  3. Launch the application

Smartphone (please complete the following information):

  • Device: Pixel 4
  • OS: Android 11

Additional Comments
Currently there is no obfuscation occurring

Hi @andrew.joyce,

It sounds like your project may be missing the SDK’s required dependencies. You should be able to resolve this by adding the below dependencies to your mobilertc/build.gradle file.

dependencies.add("default","androidx.security:security-crypto:1.1.0-alpha03")
dependencies.add("default","com.google.crypto.tink:tink-android:1.5.0")
dependencies.add("default","com.google.android.exoplayer:exoplayer-core:2.13.3")
dependencies.add("default","com.google.android.exoplayer:exoplayer-ui:2.13.3")
dependencies.add("default","androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")

dependencies.add("default","androidx.appcompat:appcompat:1.3.1")
dependencies.add("default","androidx.constraintlayout:constraintlayout:2.1.0")
dependencies.add("default","com.google.android.material:material:1.4.0")
dependencies.add("default","com.google.android:flexbox:2.0.1")
dependencies.add("default","androidx.multidex:multidex:2.0.0")
dependencies.add("default","com.google.code.gson:gson:2.8.1")
dependencies.add("default","com.github.bumptech.glide:annotations:4.11.0")
dependencies.add("default","com.github.bumptech.glide:glide:4.11.0")

dependencies.add("default","androidx.recyclerview:recyclerview:1.2.1")
dependencies.add("default","com.airbnb.android:lottie:4.0.0")

dependencies.add("default","androidx.window:window:1.0.0-alpha06")
dependencies.add("default", "com.google.android.material:material:1.4.0")

dependencies.add("default","androidx.window:window-java:1.0.0-beta03")

dependencies.add("default","org.jetbrains.kotlin:kotlin-stdlib:1.5.21")
dependencies.add("default","androidx.core:core-ktx:1.6.0")
dependencies.add("default","androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0")
dependencies.add("default","androidx.lifecycle:lifecycle-runtime-ktx:2.4.0")

Thanks!

Thanks for the suggestion. Unfortunately, the Gradle file already had these dependencies. So far the only thing that works is updating the app build.gradle to include the following additional dependencies

implementation files('../commonlib/commonlib.aar')
implementation files('../mobilertc/mobilertc.aar')

//Additionanl Dependencies. 
implementation 'com.google.android:flexbox:2.0.1'
implementation 'com.airbnb.android:lottie:4.2.1'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.github.bumptech.glide:annotations:4.11.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'

Hi @andrew.joyce,

If adding the dependencies directly in your app’s build.gradle resolves the issue, it is completely acceptable to add the SDK’s required dependencies here instead.

Thanks!

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