【问题标题】:ERROR: Failed to resolve: androidx.recycleview:recyclerview:1.0.0错误:无法解决:androidx.recycleview:recyclerview:1.0.0
【发布时间】:2020-03-26 07:49:42
【问题描述】:

我有错误评论

错误:无法解决:androidx.recycleview:recyclerview:1.1.0" 和 “错误:无法解决:com.google.firebase:firebase-core:19.3.0” 如下;

错误:无法解决:androidx.recycleview:recyclerview:1.0.0

添加 Google Maven 存储库并同步项目

在项目结构对话框中显示

受影响的模块:app

错误:无法解决:com.google.firebase:firebase-core:19.3.0

在项目结构对话框中显示

受影响的模块:app

如何解决这些错误?请指教。

build.gradle代码如下;

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"
    defaultConfig {
        applicationId "io.github.stack07142.firebase_photos"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 5
        versionName "1.4"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dataBinding {

        enabled = true
    }
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })


    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.firebase:firebase-auth:19.3.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
    implementation 'com.google.firebase:firebase-storage:19.1.1'
    implementation 'com.google.firebase:firebase-database:19.2.1'
    implementation 'androidx.recycleview:recyclerview:1.1.0'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    implementation 'com.google.firebase:firebase-analytics:17.2.3'
    testImplementation 'junit:junit:4.13'
}
allprojects {
    repositories {
        maven{
            url 'https://maven.google.com'
        }
        jcenter()
        maven{url'http://maven.fabric.io/public'}
    }
}

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

【问题讨论】:

  • 请发布您的顶级build.gradle

标签: android gradle android-recyclerview build


【解决方案1】:
   implementation 'androidx.recyclerview:recyclerview:1.1.0'
   implementation 'androidx.recycleview:recyclerview:1.1.0'

【讨论】:

  • 谢谢您的快速回答。我改为 (implementation 'androidx.recycleview:recyclerview:1.1.0' ) 但是,仍然有同样的错误。错误:无法解决:androidx.recycleview:recycleview:1.1.0
【解决方案2】:

你需要在你的项目中添加 google() 这样的顶级构建文件

buildscript {
    repositories {
        ...
        google()
    }
...
allprojects {
    repositories {
        ...
        google()
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-09-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-19
    • 2016-02-26
    • 2018-01-05
    相关资源
    最近更新 更多