NewToAndroid97
NewToAndroid97

Reputation: 1

Failed to resolve: com.android.support.cardview-v7:28.0.0:

I am getting the above error when trying to add both the card view and recycler view dependencies to my app.

Below are my dependencies in my app level build.gradle:

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-core-utils:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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.google.firebase:firebase-core:16.0.1'

implementation 'com.android.support:design:28.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'

implementation 'com.android.support.cardview-v7:28.0.0'
implementation 'com.android.support.recyclerview-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'


implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
}

I believe I have the relevant input for repositories in my project level buildgradle as shown below. So I am unsure why I am getting this error.

    buildscript {

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



    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }

}

Upvotes: 0

Views: 9514

Answers (2)

ATEF SHAHRIER EVAN
ATEF SHAHRIER EVAN

Reputation: 89

The best way to do is follow Google Developers Offical Website : Here

The dependency should be :

implementation "androidx.cardview:cardview:1.0.0"

Upvotes: 0

Erwin Kurniawan A
Erwin Kurniawan A

Reputation: 1008

You are using dot instead colon

implementation 'com.android.support.cardview-v7:28.0.0'

should be

implementation 'com.android.support:cardview-v7:28.0.0'

and your recyclerview aswell :

implementation 'com.android.support:recyclerview-v7:28.0.0'

Upvotes: 3

Related Questions