react-native-twilio-video-webrtc
react-native-twilio-video-webrtc copied to clipboard
Could not find method compile() for arguments [project ':react-native-twilio-video-webrtc']
Steps to reproduce
- Set up react-native-twilio-video-webrtc as explained in the documentation
- Run the application using ReactNative CLI
Expected behaviour
The app is supposed to run without issues
Actual behaviour
Constantly getting the following error:
A problem occurred evaluating project ':app'.
Could not find method compile() for arguments [project ':react-native-twilio-video-webrtc'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Environment
- Node.js version: v16.15.1
- React Native version: 0.67.4
- React Native platform + platform version: Android Tiramisu
react-native-twilio-video-webrtc
Version: 1.0.1
I was able to pass this issue by using implementation instead of compile, however, another error raised
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> java.lang.OutOfMemoryError (no error message)
Compile was removed in recent versions of the package. I noticed in your version that you were using 1.0.1. Could you try bumping that up?
@slycoder I tried that and re set the package now I'm getting the following issue
Could not find org.webrtc:google-webrtc:1.0.30039.
@bennaaym I fixed that issue by adding jcenter() as a repository to the allprojects section within build.gradle like so:
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android'))
}
maven {
// Android JSC is installed from npm
url(new File(['node', '--print', "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), '../dist'))
}
google()
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup 'com.facebook.react'
}
}
jcenter() // <-- Add this
maven { url 'https://www.jitpack.io' }
}
}
Add this instead implementation(project(':react-native-twilio-video-webrtc'))