簡體   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