0

While trying to upgrade Glide from 3.7.0 to 4.2.0, Android Studio complained:

Error:Failed to resolve: com.android.support:support-annotations:26.0.2 Install Repository and sync project
Open File
Show in Project Structure dialog

Error:Failed to resolve: com.android.support:support-annotations:26.0.2 Install Repository and sync project
Open File
Show in Project Structure dialog

I tried changing my locuslabs-android-sdk/sdk/build.gradle as follows:

from:

compile "com.github.bumptech.glide:glide:${glide}"

to:

compile("com.github.bumptech.glide:glide:${glide}") {
    exclude module: 'com.android.support:support-annotations'
}

But Android Studio still complained with the same error message.

Michael Osofsky
  • 11,429
  • 16
  • 68
  • 113

2 Answers2

0

From Failed to resolve: com.android.support:support-v13:26, I obtained a different syntax for expressing the exclusion and this eliminated the problem:

compile("com.github.bumptech.glide:glide:${glide}") {
    exclude group: 'com.android.support', module: 'support-annotations'
}
Michael Osofsky
  • 11,429
  • 16
  • 68
  • 113
0

Add below lines to your build.gradle (app level) file.

allprojects {
repositories {
    jcenter()
    maven {
        url "https://maven.google.com"
    }
}

After adding above lines - clean build your project and run

Root
  • 3
  • 2