Crash While adding ShareView (addShareVideoUnit)

Description
java.lang.NoSuchMethodError: No virtual method setMargins(IIII)V in class Landroidx/constraintlayout/widget/ConstraintLayout$LayoutParams; or its super classes (declaration of ‘androidx.constraintlayout.widget.ConstraintLayout$LayoutParams’ appears in /data/app/~~sT0A7dVF5ifWXSTrf9gRsA==/com.package.package.debug–vlQqSqaUhlQAMrZEMFnxQ==/base.apk)
at com.zipow.annotate.AnnoInputView.updateAnnotateWndSize(AnnoInputView.java:327)
at com.zipow.annotate.AnnoViewMgr$2.run(AnnoViewMgr.java:193)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Which Android Meeting SDK version?
5.7.1.1267

To Reproduce(If applicable)
I’m adding shareVideoUnit while someone share a view,

 binding.fragmentInMeetingMainFrame.addView(
            videoView,
            FrameLayout.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT
            )
        )
        defaultVideoManager = videoView.binding.videoContentView.videoViewManager

                    defaultVideoManager.removeAllVideoUnits()
                    defaultVideoManager.addShareVideoUnit(userShareId, shareRenderInfo)

fragmentInMeetingMainFrame is a FrameLayout inside a ConstraintLayout, while the videoView is MobileRTCVideoView inside a FrameLayout

It works fine in the case of addAttendeeVideoUnit, there is something wrong with addShareVideoUnit

It works well with the sample app included in the sdk, can’t really figure out what I’m doing wrong, please let me know if there is a certain view hierarchy to follow or a specific (other) type of view is to be incorporated.

This happened when I updated the zoom SDK from 5.5 to 5.7 the latest version.

For anyone out there: I fixed it by updating the dependency versions specifically ConstraintLayout in the build.gradle of mobilertc

That’s great to hear you were able to resolve this!

Please don’t hesitate to reach back out with any additional questions. :slightly_smiling_face:

1 Like