Error:Failed to resolve: support-Annotations

Asked

Viewed 110 times

0

I went to remove external libraries from my project because I was getting mixed version errors from appCompat library, I tried to delete everything related to version 25.2.0 because I need to use 22.2.1 compile 'com.android.support:appcompat-v7:22.2.1'. The error happens when I try Gradle Sync, see the image:

inserir a descrição da imagem aqui

How can I regain what is asked of me.

UPDATE:

I get this error if I try to build:

Error:Could not resolve all files for Configuration ':app:debugCompileClasspath'.

Could not find support-Annotations.jar (com.android.support:support-Annotations:25.2.0). Searched in the following Locations: file:/G:/Static/Android/sdk/extras/android/m2repository/com/android/support/support-Annotations/25.2.0/support-Annotations-25.2.0.jar

  • Do not put an error image in the question, but the error text, e.g.: Errot: Failed to resolve: support-Annotations. Facilitates reading and help in the search for error message by indexing mechanisms, example google.

  • I put the name in writing, just wanted to avoid wrong answers. I’ve seen errors of this type, but in the error was the version that was missing, in the image it is clear that I put all the information, and that has nothing on the version

1 answer

0

You have to add to the block dependencies from build.Radle the following dependency:

compile 'com.android.support:support-annotations:22.2.1'
  • The error remains the same if you put it in the last version (27.0.2) this error disappears, but then I run out of classes in the code. Ex: import android.support.v4.app error if you put the latest version.

  • Ask the question build.Radle

Browser other questions tagged

You are not signed in. Login or sign up in order to post.