4

I have recently updated my Android Studio to api 25 with the the latest sdk tools and repositories. But I'm now getting a gradle project sync failed. Basic functionality will not work properly error and nothing is working after the update. How can I rectify this to get android studio working again?

Note: I can attach the necessary screenshots or files if asked.

App level gradle file

apply plugin: 'com.android.application'

android {

compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
    applicationId "com.example.aadithyavarma.test"
    minSdkVersion 23
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
productFlavors {
}
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    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:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:25.3.1'

compile 'com.android.support:support-fragment:25.3.1'
compile 'com.android.support:support-core-ui:25.3.1'
compile 'com.android.support:support-compat:25.3.1'
compile 'com.android.support:support-media-compat:25.3.1'
compile 'com.android.support:support-core-utils:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:support-annotations:25.3.1'
testCompile 'junit:junit:4.12'
}

Error Files

Error:Error:Failed to resolve: com.android.support:support-fragment:25.3.1
Error:Error:Failed to resolve: com.android.support:support-core-ui:25.3.1
Error:Error:Failed to resolve: com.android.support:support-compat:25.3.1
Error:Error:Failed to resolve: com.android.support:support-media-compat:25.3.1
Error:Error:Failed to resolve: com.android.support:support-core-utils:25.3.1
Error:Error:Failed to resolve: com.android.support:recyclerview-v7:25.3.1
Error:Error:Failed to resolve: com.android.support:support-annotations:25.3.1
  • Check if you have installed that version of the support library or use the one you have installed [follow this](https://developer.android.com/topic/libraries/support-library/setup.html) – 3vts Mar 31 '17 at 05:28
  • Yes, android support repository version 47.0.0 is installed. And according to android studio I have no more update remaining – Aadithya Varma Mar 31 '17 at 05:32
  • You only put the design support library in your gradle there....... – cipley Mar 31 '17 at 06:47
  • @cipley I tried putting those also. But the result is same. I'm still getting the same error. – Aadithya Varma Mar 31 '17 at 07:46
  • The problem is resolved now. Turns out I was updating Android Studio and the updates were cancelled abruptly, hence the files got messed up while downloading the updates again. I reinstalled Android Studio fresh and now I can use it well. If someone has a solution without reinstalling please put it here. – Aadithya Varma May 17 '17 at 16:24

0 Answers0