Simo Chafaoui
Simo Chafaoui

Reputation: 21

Failed to resolve: com.android.support:appcompat-v7:27.0.3

This is an eclipse project that I migrated to android studio, it was working just fine till I upgraded android studio to the latest version today and I have this problem for hours now, can you please help me?

This is my build.gradle (module):

apply plugin: 'com.android.application'
android {
   compileSdkVersion 27
   buildToolsVersion '27.0.3'

   defaultConfig {
      applicationId "com.example.com"
      minSdkVersion 14
      targetSdkVersion 27
   }

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

dependencies {
    implementation 'com.android.support:appcompat-v7:27.0.3'
    implementation 'com.google.android.gms:play-services:12.0.1'

}

This is my build.gradle (project):

buildscript {
   repositories {

      google()
      jcenter()


   }
  dependencies {
      classpath 'com.android.tools.build:gradle:3.1.2'

  }
}

allprojects {
   repositories {
      jcenter()
      google()
   }
}

Upvotes: 1

Views: 3810

Answers (2)

Khemraj Sharma
Khemraj Sharma

Reputation: 58934

Replace

implementation 'com.android.support:appcompat-v7:27.0.3'

with

implementation 'com.android.support:appcompat-v7:27.0.2'

Perhaps you pasted buildToolVersion in this.

Upvotes: 1

stkent
stkent

Reputation: 20128

That's because there is no version 27.0.3 of appcompat-v7. Check this page to see published versions (expand the com.android.support -> appcompat-v7 sections). As of right now, these 27.X versions exist:

  • 27.0.0
  • 27.0.1
  • 27.0.2
  • 27.1.0
  • 27.1.1

Upvotes: 2

Related Questions