ОШИБКА: невозможно разрешить зависимость для ':app@debug/compileClasspath': не удалось разрешить androidx.recyclerview: recyclerview: 1.1.0 - PullRequest
0 голосов
/ 31 марта 2020

как это исправить? в моем файле уровня модуля build.gradle, когда я добавляю зависимость переработчика, я получаю эту ошибку после синхронизации версий project.gradle и android, все они обновлены.

Уровень приложения build.gradle:

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 29
        buildToolsVersion "29.0.0"

        defaultConfig {
            applicationId "com.example.recyclerexample"
            minSdkVersion 16
            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.recyclerview:recyclerview:1.1.0"
        // For control over item selection of both touch and mouse driven selection
        implementation "androidx.recyclerview:recyclerview-selection:1.1.0-rc01"

        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test.ext:junit:1.1.1'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'


    }

project level build.gradle file

// 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'


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

allprojects {
    repositories {
        google()
        jcenter()

    }
}

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

Я получаю эту ошибку "ОШИБКА: невозможно разрешить зависимость для ':app@debug/compileClasspath': не удалось разрешить androidx.recyclerview: recyclerview: 1.1.0"

1 Ответ

0 голосов
/ 31 марта 2020

Поделитесь своим файлом Gradle уровня проекта

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...