Hello Experts and wish you a very happy 2023!.
I’m running into an error ONLY ON API 9 and BELOW wherein I see a run-time crash in an app that embeds the Android SDK (SDK is built from source, version 6.2.2). Below is logcat output that is specific to the crash:
2023-01-03 08:57:56.985 21416-22124/ E/AndroidRuntime: FATAL EXCEPTION: pool-40-thread-1
Process: , PID: 21416
java.lang.NoSuchMethodError: No virtual method position(I)Ljava/nio/FloatBuffer; in class Ljava/nio/FloatBuffer; or its super classes (declaration of ‘java.nio.FloatBuffer’ appears in /system/framework/core-oj.jar)
at org.webrtc.GlUtil.createFloatBuffer(GlUtil.java:47)
at org.webrtc.GlGenericDrawer.(GlGenericDrawer.java:75)
at org.webrtc.YuvConverter.(YuvConverter.java:111)
at org.webrtc.YuvConverter.(YuvConverter.java:118)
at org.webrtc.SurfaceTextureHelper.create(SurfaceTextureHelper.java:92)
at com.oney.WebRTCModule.GetUserMediaImpl.createVideoTrack(GetUserMediaImpl.java:372)
at com.oney.WebRTCModule.GetUserMediaImpl.getUserMedia(GetUserMediaImpl.java:202)
at com.oney.WebRTCModule.WebRTCModule.lambda$getUserMedia$3$WebRTCModule(WebRTCModule.java:494)
at com.oney.WebRTCModule.-$$Lambda$WebRTCModule$0qkZibMzcY8Pwtjjc0Lt3Ovz8Z8.run(Unknown Source:8)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2023-01-03 08:57:56.994 21416-22124/ E/JitsiMeetSDK: JitsiMeetUncaughtExceptionHandler FATAL ERROR
java.lang.NoSuchMethodError: No virtual method position(I)Ljava/nio/FloatBuffer; in class Ljava/nio/FloatBuffer; or its super classes (declaration of ‘java.nio.FloatBuffer’ appears in /system/framework/core-oj.jar)
at org.webrtc.GlUtil.createFloatBuffer(GlUtil.java:47)
at org.webrtc.GlGenericDrawer.(GlGenericDrawer.java:75)
at org.webrtc.YuvConverter.(YuvConverter.java:111)
at org.webrtc.YuvConverter.(YuvConverter.java:118)
at org.webrtc.SurfaceTextureHelper.create(SurfaceTextureHelper.java:92)
at com.oney.WebRTCModule.GetUserMediaImpl.createVideoTrack(GetUserMediaImpl.java:372)
at com.oney.WebRTCModule.GetUserMediaImpl.getUserMedia(GetUserMediaImpl.java:202)
at com.oney.WebRTCModule.WebRTCModule.lambda$getUserMedia$3$WebRTCModule(WebRTCModule.java:494)
at com.oney.WebRTCModule.-$$Lambda$WebRTCModule$0qkZibMzcY8Pwtjjc0Lt3Ovz8Z8.run(Unknown Source:8)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
java.lang.NoSuchMethodError: No virtual method position(I)Ljava/nio/FloatBuffer; in class Ljava/nio/FloatBuffer; or its super classes (declaration of 'java.nio.FloatBuffer' appears in /system/framework/core-oj.jar)
at org.webrtc.GlUtil.createFloatBuffer(GlUtil.java:47)
at org.webrtc.GlGenericDrawer.<clinit>(GlGenericDrawer.java:75)
at org.webrtc.YuvConverter.<init>(YuvConverter.java:111)
at org.webrtc.YuvConverter.<init>(YuvConverter.java:118)
at org.webrtc.SurfaceTextureHelper.create(SurfaceTextureHelper.java:92)
at com.oney.WebRTCModule.GetUserMediaImpl.createVideoTrack(GetUserMediaImpl.java:372)
at com.oney.WebRTCModule.GetUserMediaImpl.getUserMedia(GetUserMediaImpl.java:202)
at com.oney.WebRTCModule.WebRTCModule.lambda$getUserMedia$3$WebRTCModule(WebRTCModule.java:494)
at com.oney.WebRTCModule.-$$Lambda$WebRTCModule$0qkZibMzcY8Pwtjjc0Lt3Ovz8Z8.run(Unknown Source:8)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
I see guidance for adding the following to fix the error:
android.enableDexingArtifactTransform.desugaring=false
to the gradle.properties
file
However, it doesn’t seem to work.
The above errors seem to be related to the following:
I noticed that files of libwebrtc are compiled using Java11, perhaps that is the source of the issue?
Any help would be greatly appreciated.
Thanks!