0
votes

Dependency problem when compiling a react-native app on the Android platform. Error is referencing this module I'm using: https://github.com/blackuy/react-native-twilio-video-webrtc but I'm not sure it's specific to it, seems to be a SDK-related issue ?

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.

  • What went wrong: A problem occurred configuring project ':app'.

    Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-twilio-video-webrtc'. Could not resolve all dependencies for configuration ':react-native-twilio-video-webrtc:_debugPublishCopy'. Could not find com.android.support:support-annotations:26.1.0. Searched in the following locations: file:/Users/antoine/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/26.1.0/support-annotations-26.1.0.pom file:/Users/antoine/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/26.1.0/support-annotations-26.1.0.jar file:/Users/antoine/R/medwayapp/android/sdk-manager/com/android/support/support-annotations/26.1.0/support-annotations-26.1.0.jar Required by: project :react-native-twilio-video-webrtc > com.android.support:appcompat-v7:25.3.1 project :react-native-twilio-video-webrtc > com.android.support:appcompat-v7:25.3.1 > com.android.support:support-vector-drawable:25.3.1 project :react-native-twilio-video-webrtc > com.android.support:design:25.3.1 > com.android.support:recyclerview-v7:25.3.1 project :react-native-twilio-video-webrtc > com.android.support:design:25.3.1 > com.android.support:transition:25.3.1 project :react-native-twilio-video-webrtc > com.android.support:appcompat-v7:25.3.1 > com.android.support:support-vector-drawable:25.3.1 > com.android.support:support-compat:25.3.1 project :react-native-twilio-video-webrtc > com.android.support:design:25.3.1 > com.android.support:support-v4:25.3.1 > com.android.support:support-media-compat:25.3.1 project :react-native-twilio-video-webrtc > com.android.support:design:25.3.1 > com.android.support:support-v4:25.3.1 > com.android.support:support-core-utils:25.3.1 project :react-native-twilio-video-webrtc > com.android.support:design:25.3.1 > com.android.support:recyclerview-v7:25.3.1 > com.android.support:support-core-ui:25.3.1 Could not find com.android.support:support-annotations:26.1.0. Searched in the following locations: file:/Users/antoine/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/26.1.0/support-annotations-26.1.0.pom file:/Users/antoine/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/26.1.0/support-annotations-26.1.0.jar file:/Users/antoine/R/medwayapp/android/sdk-manager/com/android/support/support-annotations/26.1.0/support-annotations-26.1.0.jar Required by: project :react-native-twilio-video-webrtc > com.twilio:video-android:1.3.8

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED`

Environment

  • Node.js version: v8.4.0
  • React Native version: 0.42.0
  • React Native platform + platform version: Android 7

react-native-twilio-video-webrtc

Version: master

build.gradle lines specific to this issue

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'
    dexOptions {
      jumboMode true
    }
    defaultConfig {
        applicationId "com.app.id"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0.0"
    }
}
dependencies {
    compile project(':react-native-twilio-video-webrtc')
    compile project(':react-native-code-push')
    compile project(':react-native-i18n')
    compile project(':react-native-vector-icons')
    compile project(':react-native-config')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:25.1.0"
    compile "com.facebook.react:react-native:+"  // From node_modules
}

Gradle build tools: 2.2.3

1

1 Answers

1
votes

Fixed ! Turned out my modules now had a dependency to com.android.support:support-annotations 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-level build.gradle repositories to make it work.