1

Recently I updated my studio to 2.0, along with several other build-tools, library updates.

Since then, I keep getting these two errors -

Error:(25, 13) Failed to resolve: com.android.support:design:22.0.1
<a href="install.m2.repo">Install Repository and sync project</a><br>

Error:(24, 13) Failed to resolve: com.android.support:appcompat-v7:22.0.1
<a href="install.m2.repo">Install Repository and sync project</a><br>

I have searched SO and the web for possible solutions and have tried resolving using API 21, API 22 and API 23 versions of the same appcompat and design repository.

This is my gradle file for the API 22 version -

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:22.0.1'
    compile 'com.android.support:design:22.0.1'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.google.code.gson:gson:2.6.2'
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
    compile 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0'
}

Please note that I have the Android Support Repository and Support library updated to their latest versions.

My SDK manager: Screenshot showing which packages under Extras are installed in SDK Manager

For reference, I have tried the solutions in these posts:

Android Studio-Failed to resolve:com.android.support:appcompat-v7.22.2.0

Android appcompat v7:23

failed to resolve com.android.support:appcompat-v7:22 and com.android.support:recyclerview-v7:21.1.2

Couldn't compile android studio project

Community
  • 1
  • 1
Puja Agrawal
  • 31
  • 1
  • 1
  • 6
  • 1
    Try this in your build.gradle dependency `compile ("com.android.support:support-v4:22.2.0")` `compile 'com.android.support:appcompat-v7:22.2.0'` and change this `compileSdkVersion 22` to `compileSdkVersion 21`. – Sandeep Devhare Apr 18 '16 at 05:51
  • Check this link to see the list of all versions available http://developer.android.com/tools/support-library/index.html#revisions – Vivek Mishra Apr 18 '16 at 06:22

2 Answers2

0

Well, I resolved the problem by changing the version of the appcompat-v7 and design repositories to 22.0.1 from 22.2.1. 22.0.1 is not a valid dependency version.

In my gradle file ->

compile 'com.android.support:appcompat-v7:22.0.1'
compile 'com.android.support:design:22.0.1'

Changed this to

compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
Puja Agrawal
  • 31
  • 1
  • 1
  • 6
0

Click Install Repository and sync project and continue install.

Fortran
  • 2,218
  • 2
  • 27
  • 33