Runtime inaccessible method errors with the latest Android WebRTC

96 views
Skip to first unread message

Higuain Bushun

unread,
Sep 6, 2023, 1:57:16 AM9/6/23
to discuss-webrtc
Hi,

I am trying to update from org.webrtc:google-webrtc:1.0.32006.

I have tried io.github.webrtc-sdk:android:114.5735.02,
com.dafruits:webrtc:116.0.0,
ch.threema:webrtc-android:114.0.0, and 
dev.bargen:webrtc-android:115.0.0

Here is how I am initializing the Peer connection:

rootEglBase = EglBase.create();
final PeerConnection.IceServer stunServer = PeerConnection
                .IceServer
                .builder("stun:stun.stunserver.com:443")
                .createIceServer();




When it reaches these lines, some of the versions above returns the following error:
java.lang.IllegalAccessError: Method 'void org.webrtc.EglBase14Impl$EglConnection.<init>()' is inaccessible to class 'org.webrtc.EglBase14Impl'

In the other versions, they are failing on the IceServer builder:
java.lang.IllegalAccessError: Method 'void org.webrtc.PeerConnection$IceServer$Builder.<init>(java.util.List)' is inaccessible to class 'org.webrtc.PeerConnection$IceServer'

Looking at the source code in Android studio, the method is a public static method, which is calling the Private constructor from with the same class file, which should be fine in Java.
Screenshot 2023-09-05 at 7.23.44 PM.png
Screenshot 2023-09-05 at 7.24.15 PM.png

Has anyone seen this issue before? Since this is happening with multiple builds could this be a dependency issue? What other information should I share to help get this resolved?
Reply all
Reply to author
Forward
0 new messages