1

I have a react native project (v0.71.4). I installed react-native-webrtc (v1.67.1) in the project and followed these steps for android upto R8/ProGuard Support section. Now when I try and build the project for android I am facing this issue.

BUILD FAILED in 2s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/appmanager/Desktop/Projects/testApps/rtc/node_modules/react-native-webrtc/android/build.gradle' line: 30

* What went wrong:
A problem occurred evaluating project ':react-native-webrtc'.
> Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org


Most of solutions online have been to replace compile with implementation but I don't have any compile lines to change.Or if I do I'm not sure where they are.

Zephyr
  • 1,612
  • 2
  • 13
  • 37

1 Answers1

0

Your module version is just so old. Take a look to this commit: https://github.com/react-native-webrtc/react-native-webrtc/commit/3fe886fcfa5a2a0bc4b91271e81f91c13c3740f9. It is 4 years old, you really need to update it.