Reputation: 21
I am developing an Android app using Eclipse ADT. I am facing
type android.support.v7.widget.RecyclerView cannot be resolved.
It is indirectly referenced from required .class files at top of the file, that means package com.example.fragments
. I added support library from E:\software\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7
but no improvement in my project - still it's showing the error. How do I fix it?
Upvotes: 0
Views: 3541
Reputation: 2467
You are using Eclipse ADT so you need to add android-support-v7-recyclerview.jar
lib to your project.
Location for this lib will be sdk\extras\android\support\v7\recyclerview\libs. Add this lib to you project and then add it to your project's build path.
And in case you are using Android Studio then you need to add following line to your build.gradle
file
compile 'com.android.support:recyclerview-v7:21.0.+'
Hope it helps.
Upvotes: 5
Reputation: 7082
Add this line to your build.gradle:
compile 'com.android.support:recyclerview-v7:21.0.+'
Upvotes: 0