繁体   English   中英

错误:无法解析“:app@debug/compileClasspath”的依赖关系:无法解析androidx.legacy:legacy-support-v4:1.0.0,为什么?

[英]ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve androidx.legacy:legacy-support-v4:1.0.0, why?

我真的不知道这个问题来自哪里,现在一直在尝试解决它。 当我执行 gradle 同步时,我不断收到此错误。

错误:无法解析“:app@debug/compileClasspath”的依赖关系:无法解析androidx.legacy:legacy-support-v4:1.0.0。

而且我什至不知道为什么我会收到一个 androidx 错误,我什至没有迁移到 androidx。 这是正常的吗?

我已经执行了我在网上找到的不同修复程序,包括将我的所有依赖项更新到最新版本。 下面我发布了我的应用程序和项目 gradle 文件

我的项目 gradle 文件:

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'
        classpath 'com.google.gms:google-services:4.3.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
//        google()
        jcenter()
        maven { url "https://jitpack.io" }
        google()
    }
}

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

我的应用 gradle 文件:

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

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.bahdape.archangels"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.google.firebase:firebase-database:19.2.0'
    implementation 'com.google.firebase:firebase-auth:19.1.0'
    implementation 'com.google.firebase:firebase-storage:19.1.0'
    implementation 'com.firebaseui:firebase-ui-database:6.0.2'
    implementation'com.squareup.picasso:picasso:2.71828'
    //compile 'com.github.jgabrielfreitas:BlurImageView:1.0.1'

    // Stated Fragment
    compile 'com.inthecheesefactory.thecheeselibrary:stated-fragment-support-v4:0.10.0'

    // Flutterwave implementation
    implementation 'com.github.Flutterwave:rave-android:1.0.40'
}

您的 firebase-ui 已移至 androidx。您可以在 gradle 中排除依赖项。 在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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