简体   繁体   中英

ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download opentok-android-sdk-v3.aar

i try to make a video chat application and i got this error after adding dependency in the build.gradle(module:app) {{{implementation 'com.opentok.android:opentok-android-sdk:2.15.3' implementation 'pub.devrel:easypermissions:0.4.0'}}} and add these to line {{{maven { url ' https://maven.google.com ' } maven { url ' https://tokbox.bintray.com/maven ' }}}} in the build.gradle (project:SkypeClone)so after add these i got this error {{{ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download opentok-android-sdk-v3.aar (com.opentok.android.v3:opentok-android-sdk-v3:3.0.3)}}} i don't Know what is the problem can any one help me

             this is my build.gradle(project: SkypeClone)


              apply plugin: 'com.android.application'

              android {
              compileSdkVersion 29
              buildToolsVersion "29.0.2"

              defaultConfig {
              applicationId "com.example.skypeclone"
              minSdkVersion 21
              targetSdkVersion 29
              versionCode 1
              versionName "1.0"

              testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
              }

              buildTypes {
              release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
              }
              }

              }

              dependencies {
              implementation fileTree(dir: 'libs', include: ['*.jar'])

              implementation 'androidx.appcompat:appcompat:1.1.0'
              implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
              implementation 'com.google.firebase:firebase-core:11.8.0'
              implementation 'com.google.firebase:firebase-database:11.8.0'
              implementation 'com.google.firebase:firebase-storage:11.8.0'
              implementation 'com.google.firebase:firebase-auth:11.8.0'
              implementation 'com.firebaseui:firebase-ui-database:3.2.2'
              implementation 'com.hbb20:ccp:2.1.9'
              implementation 'pub.devrel:easypermissions:0.4.0'
              implementation 'com.squareup.picasso:picasso:2.71828'

              implementation 'com.google.android.material:material:1.1.0'
              implementation 'androidx.navigation:navigation-fragment:2.0.0'
              implementation 'androidx.navigation:navigation-ui:2.0.0'
              implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
              implementation 'com.opentok.android:opentok-android-sdk:2.15.3'
              implementation 'pub.devrel:easypermissions:0.4.0'


               testImplementation 'junit:junit:4.12'
                androidTestImplementation 'androidx.test.ext:junit:1.1.1'
               androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
              }

              apply plugin: 'com.google.gms.google-services'








           this my build.gradle (project:SkypeClone)

              // Top-level build file where you can add configuration options common to all sub-projects/modules.

             buildscript {

              repositories {
                google()
                jcenter()

               }
               dependencies {
                 classpath 'com.android.tools.build:gradle:3.6.1'
                 classpath 'com.google.gms:google-services:4.3.3'


                  // NOTE: Do not place your application dependencies here; they belong
                  // in the individual module build.gradle files
                }
                }

                allprojects {
                  repositories {
                  google()
                  jcenter()
                   maven { url 'https://maven.google.com' }
                  maven { url 'https://tokbox.bintray.com/maven' }
                  }
                 }

                task clean(type: Delete) {
                delete rootProject.buildDir
                }

Here is the code.

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        classpath 'com.google.gms:google-services:4.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven{ url 'https://maven.google.com' }
        maven{ url 'https://tokbox.bintray.com/maven' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

This is the second file

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.swapnadeep.videocallingapp"
        minSdkVersion 23
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.google.firebase:firebase-storage:11.8.0'
    implementation 'com.firebaseui:firebase-ui-database:3.2.2'
    implementation 'com.google.firebase:firebase-auth:11.8.0'

    implementation 'com.opentok.android:opentok-android-sdk:2.15.3'

    implementation 'com.hbb20:ccp:2.1.9'
    implementation 'pub.devrel:easypermissions:0.4.0'
//    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.navigation:navigation-fragment:2.0.0'
    implementation 'androidx.navigation:navigation-ui:2.0.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
apply plugin: 'com.google.gms.google-services'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM