Closed bilalsammour closed 1 year ago
Hi,
I also having the same issue with release build. App is crashing while starting audio or video call. Development build its not crashing. Please suggest the solution for this.
Hi there.
The app exits when opening the video call on release mode only.
I have investigated then found where the issue is, I have found the issues, the issue is: No pending exception expected: java.lang.ClassNotFoundException: com.opentok.android.SubscriberKit$SubscriberAudioStats.
I have attached the full error message as a text file, and screenshot as well.
Please advise.
Hi bilalsammour, Just add below code to you proguard-rule file of your project. Its fixed crash in my kotlin project.
-keep class com.opentok.android.v3. { ; } -keep class com.opentok.android.v3.$ { ; } -keep public class * extends com.opentok.android.v3.OpentokException -keep class com.opentok.android. { ; } -keep class com.opentok.android.Session { ; } -keep class com.opentok.client. { *; } -keep class com.opentok.impl. { *; } -keep class com.opentok.otc. { *; } -keep class org.webrtc.* { ; } -keep class org.otwebrtc. { *; } -keep class org.otwebrtc.voiceengine. { ; } -keep class org.otwebrtc.WebRtcClassLoader {;} -keep class org.otwebrtc.voiceengine61. { ; } -keep class org.otwebrtc.voiceengine.BuildInfo { ; }
-dontwarn com.opentok. -keepclassmembers class com.opentok. { *; }
Hi, I also having the same issue with release build. App is crashing while starting audio or video call. Development build its not crashing. Please suggest the solution for this.
I found a workaround to fix the issue:
minifyEnabled false
shrinkResources false
useProguard true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
-keep class androidx.lifecycle.DefaultLifecycleObserver
That is it.
Do you guys consider to have example with the obfuscation rules? Do you guys consider to ship with obfuscation rules inside aar file?
useProguard was removed in gradle 7.0.0. If you're using gradle >7.0.0 just add the following lines under buildTypes :
minifyEnabled false
shrinkResources false
Hi there.
The app exits when opening the video call on release mode only.
I have investigated then found where the issue is, I have found the issues, the issue is: No pending exception expected: java.lang.ClassNotFoundException: com.opentok.android.SubscriberKit$SubscriberAudioStats.
I have attached the full error message as a text file, and screenshot as well.
Please advise.