blackuy / react-native-twilio-video-webrtc

Twilio Video (WebRTC) for React Native
https://www.twilio.com/docs/video
MIT License
608 stars 403 forks source link

Could not resolve all dependencies for configuration ':react-native-twilio-video-webrtc:_debugPublishCopy'. > Could not find com.android.support:support-annotations:26.1.0 #96

Closed aauffray closed 6 years ago

aauffray commented 6 years ago

I'm not actually sure it's the module's fault since it's a pretty specific Android error but I hope someone knows how to fix that

Steps to reproduce

  1. Try compiling the app, either debug or release

Expected behaviour

App should compile succesfully

Actual behaviour

`FAILURE: Build failed with an exception.

BUILD FAILED`

Environment

react-native-twilio-video-webrtc

Version: master

aauffray commented 6 years ago

My theory: 1.0.2 version of the module is causing this, but I can't find a way to use the 1.0.1 version I used previously

error Couldn't find match for "1.0.1" in "master,v2" for "https://github.com/blackuy/react-native-twilio-video-webrtc".

Am I right ?

aauffray commented 6 years ago

Fixed ! Turned out my modules now had a dependency to com.android.support:support-annotations (due to this module new version ? I don't know for sure) and that none of the repositories I was fetching packages from had it. I had to add maven { url "https://maven.google.com" } to my top-levem build.gradlerepositories to make it work.

ttebify commented 1 year ago

You can add the "https://maven.google.com/" repository to the top-level build.gradle file of your project by following these steps:

Open the top-level build.gradle file in your project. This is typically located in the root directory of your project, and it should be named "build.gradle"

In the build.gradle file, look for the "allprojects" section. This section should contain a block of code that starts with "allprojects {".

Inside the "allprojects" block, you should find a "repositories" block. This block should contain a list of repositories that the project is currently configured to fetch packages from.

Inside the "repositories" block, add the following line:

maven { url "https://maven.google.com" }

This line tells gradle to look for packages in the "https://maven.google.com/" repository.

Save the build.gradle file and run the command "./gradlew clean" to clean the build and then run your app again. Your build.gradle file should look like this:

allprojects {
    repositories {
        ...
        maven { url "https://maven.google.com" }
    }
}
abdulbasit34310 commented 12 months ago

I think we should add this:

maven { url 'https://maven.google.com' } maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" }