0

I'm trying to change the the version of my 'com.android.support:recyclerview'. Generally, when you want to change the version of android-support you have to change all the dependencies which are connected to com.android.support so I put the latest version which is 26.1.0 and it keeps giving me this error please help me out

Error:(47, 13) Failed to resolve: com.android.support:support-v4:26.1.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/median1/AndroidStudioProjects/sora/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:(41, 13) Failed to resolve: com.android.support.constraint:constraint-layout:26.1.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/median1/AndroidStudioProjects/sora/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>



Error:(46, 13) Failed to resolve: com.android.support:design:26.1.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/median1/AndroidStudioProjects/sora/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>



Error:(46, 13) Failed to resolve: com.android.support:design:26.1.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/median1/AndroidStudioProjects/sora/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>


Error:(38, 13) Failed to resolve: com.android.support:appcompat-v7:26.1.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/median1/AndroidStudioProjects/sora/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:(39, 13) Failed to resolve: com.android.support:recyclerview-v7:26.1.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/median1/AndroidStudioProjects/sora/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>


Error:(40, 13) Failed to resolve: com.android.support:cardview-v7:26.1.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/median1/AndroidStudioProjects/sora/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

and these are my dependencies

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

    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support:recyclerview-v7:26.1.0'
    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.android.support.constraint:constraint-layout:26.1.0'
    compile 'com.google.firebase:firebase-database:11.0.2'
    compile 'com.firebaseui:firebase-ui-database:0.4.2'
    compile 'com.google.firebase:firebase-auth:11.0.2'
    compile 'com.firebase:firebase-client-android:2.3.1'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:support-v4:26.1.0'
    compile 'com.sunfusheng:marqueeview:1.2.0'
    compile 'com.google.firebase:firebase-storage:11.0.2'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.google.firebase:firebase-core:11.0.2'
    testCompile 'junit:junit:4.12'
}  
Zoe
  • 27,060
  • 21
  • 118
  • 148
rawand feryad
  • 33
  • 1
  • 3
  • 11

1 Answers1

0

I'll add my gradle, sync and works for me:

repositories {
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }
         }
    }

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.package.android"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "0.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

}

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

    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support:support-v4:26.1.0'
    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.android.support:recyclerview-v7:26.1.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:26.1.0'

...

Hope it helps,

Crono
  • 2,024
  • 18
  • 16