Bonton255
Bonton255

Reputation: 2439

Error:Failed to find: com.android.support:support-v7:21.0.+

I have read various forum posts but none of them worked for me. I am inclined to believe that something has changed with the Android SDK lately, hence asking the question again in the hope of getting the latest answer.

In my SDK Manager, I have installed:

I my SDK installation directory, I can see the file: sdk\sources\android-21\android\support\v7\widget\RecyclerView.java

My AndroidStudio project's SDK location is the same as the above SDK.

I want to use the class android.support.v7.widget.RecyclerView.

However, I cannot build my application. I have just created a new application in AndroidStudio

I tried adding the dependency: compile 'com.android.support:support-v7:21.0.+' to my build.gradle file, and I get the following error:

Error:Failed to find: com.android.support:support-v7:21.0.+

What is going wrong here?

I have already tried clearing the whole folder at C:\users\.android, and re-starting SDK Manager.

Aside from this problem, I don't see Android L Dev Preview in the list of packages in SDK Manager, but see Android 5.0 instead. I suppose that is okay?

Upvotes: 2

Views: 2732

Answers (1)

Patrick
Patrick

Reputation: 4870

Did you forget to install the Android Support Repository?

It is mentioned as a side note in the setup guide for the support library

Regarding your question on the Android L Dev Preview: You don't see it because the final version is already available (which you have installed).

Upvotes: 3

Related Questions