React-native-webrtc: Fail to run react-native run-android on react-native 0.61, react-native-webrtc 1.75

Created on 14 Mar 2020  路  5Comments  路  Source: react-native-webrtc/react-native-webrtc

Expected behavior

App starts and runs

Observerd behavior

App crashed when run react-native run-android
I tried to clean and build multiple times but it seems like it's the library/importing issue

java.lang.NoSuchMethodError: No static method createEgl14([I)Lorg/webrtc/EglBase14; in class Lorg/webrtc/EglBase; or its super classes (declaration of 'org.webrtc.EglBase' appears in /data/app/com.awesomeproject-ZT3O95RIqLEg0Kt5h2dpQA==/base.apk)
        at com.oney.WebRTCModule.EglUtils.getRootEglBase(EglUtils.java:35)
        at com.oney.WebRTCModule.EglUtils.getRootEglBaseContext(EglUtils.java:62)
        at com.oney.WebRTCModule.WebRTCModule.initAsync(WebRTCModule.java:98)
        at com.oney.WebRTCModule.WebRTCModule.lambda$new$0$WebRTCModule(WebRTCModule.java:73)
        at com.oney.WebRTCModule.-$$Lambda$WebRTCModule$CnyHZvkjDxq52UReGHUZlY0JsVw.run(Unknown Source:4)
        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:919)

Steps to reproduce the problem

I followed https://github.com/react-native-webrtc/react-native-webrtc/blob/master/Documentation/AndroidInstallation.md
in my gradle-wrapper.properties I have
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip to match with my gradle plug-in version

Runs the project

Platform information

"react": "16.9.0"

  • React Native version: 0.61.4,
  • Plugin version: ^1.75.3
  • OS: Android
  • OS version:
    Gradle Plug-in : 3.6.1
    Gradle: 6.0.1
    (I have a feeling Gradle might affect this since I just updated to the newest Android/Gradle version)

Most helpful comment

Should be able to fix the issue by opening up your gradle.properties file and adding in this android.enableDexingArtifactTransform.desugaring=false seems to be an issue with the new gradle versions, hopefully fixed soon.

All 5 comments

Should be able to fix the issue by opening up your gradle.properties file and adding in this android.enableDexingArtifactTransform.desugaring=false seems to be an issue with the new gradle versions, hopefully fixed soon.

OMG it worked now. I attempted to fix it for days.

Should be able to fix the issue by opening up your gradle.properties file and adding in this android.enableDexingArtifactTransform.desugaring=false seems to be an issue with the new gradle versions, hopefully fixed soon.

Thanks It's Working, But will it causes any effect to Webrtc ?, Means Webrtc Work fine after adding this line ?

So far it doesn't seem to cause any issues, everything works as expected.
Hopefully in the much newer versions of gradle coming it won't be an issue.

So far it doesn't seem to cause any issues, everything works as expected.
Hopefully in the much newer versions of gradle coming it won't be an issue.

@8BallBomBom which version do you mean? faced same issue

Was this page helpful?
0 / 5 - 0 ratings