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.

1
  • It is in your node_modules: Users/appmanager/Desktop/Projects/testApps/rtc/node_modules/react-native-webrtc/android/build.gradle Commented Apr 6, 2023 at 15:23

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.