Trouble react-native-webrtc (android) and react-native 0.59.0+

Hello everyone!

The installation instructions for react-native-webrtc for the android application are not relevant today (https://github.com/react-native-webrtc/react-native-webrtc/blob/master/Documentation/AndroidInstallation.md).

If we indicate in the project:
classpath ‘com.android.tools.build:gradle:3.0.1’
distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip

It becomes impossible to use react-native newer than 0.58.6 due to the react.gradle config.

And when using react-native-cli to create a new project, the minimum version of react-native is 0.59.0 (npx react-native init AwesomeProject --version X.XX.X).

Do you plan further support for the project
react-native-webrtc with new versions of react-native 0.62.2+?

1 Like

You are right, the instructions do need updating a little.
But the module does indeed work on the latest React-Native.

Just means adding the following to your android/gradle.properties file.
android.enableDexingArtifactTransform.desugaring=false
Along with "com.android.tools.build:gradle:3.6.2" in android/build.gradle and also distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip in android/gradle/wrapper/gradle-wrapper.properties

Those changes are mostly needed due to gradle upgrades used by newer React-Native versions.

2 Likes