How to add recuperation to xml layout

I follow this link as mentioned in the link, I am trying to add a processor view as follows:

<android.support.v7.widget.RecyclerView android:id="@+id/my_recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="vertical" /> 

I added the android-support-v7-appcompat library project and also tried to add recyclerview-v7-21.0.0-rc1.aar to libs , but still getting the following error.

The following classes could not be found: - android.support.v7.widget.RecyclerView

Note. I updated Android SDK Tools, Android SDK Platform Tools, Android SDK Build Tools, Android L (API 20, L Preview)

please, help..

+7
android eclipse android-5.0-lollipop android-recyclerview android-support-library
source share
2 answers

You cannot add aar file to libs folder in Eclipse (it is not a jar file)

The best way to work with the new RecyclerView is currently switching to Android Studio and adding this dependency to your build.gradle

 compile 'com.android.support:recyclerview-v7:+' 

Just a note. It is not good practice to use the "+" placeholder, but in this case you are trying to pre-release, so the stable version will be updated soon.

You can use one of these versions. Check your sdk for the updated version:

  //it requires compileSdkVersion 23 compile 'com.android.support:recyclerview-v7:23.3.0' compile 'com.android.support:recyclerview-v7:23.2.1' compile 'com.android.support:recyclerview-v7:23.2.0' compile 'com.android.support:recyclerview-v7:23.1.1' compile 'com.android.support:recyclerview-v7:23.1.0' compile 'com.android.support:recyclerview-v7:23.0.1' compile 'com.android.support:recyclerview-v7:23.0.0' //it requires compileSdkVersion 22 compile 'com.android.support:recyclerview-v7:22.2.1' compile 'com.android.support:recyclerview-v7:22.2.0' compile 'com.android.support:recyclerview-v7:22.1.1' compile 'com.android.support:recyclerview-v7:22.1.0' compile 'com.android.support:recyclerview-v7:22.0.0' //it requires compileSdkVersion 21 compile 'com.android.support:recyclerview-v7:21.0.3' compile 'com.android.support:recyclerview-v7:21.0.2' compile 'com.android.support:recyclerview-v7:21.0.0' 

Of course, you can still use Eclipse , but this will require some manual operations.
You can find the entire library of support libraries in this folder:

 sdk/extras/android/m2repository/com/android/support/ 

Here you can check the whole version.
In the folders you will find the aar file of the aar libraries. Inside you can check the classes.jar file, res folder and AndroidManifest file.

  • Create a project in your workspace

  • Unzip the AAR to a directory.

  • Copy the AndroidManifest.xml , res and assets folders from the AAR into your project.

  • Create a libs directory in your project and copy classes.jar into it

  • Add a dependency.

  • Use SDK 23 to compile

  • Mark the project as a library

The Recyclerview library has support-v4.jar and support- annotations-23.xXjar as dependencies.

+13
source share

ECLIPSE

If your problem is not resolved or for future readers, here is the answer: from android sdk manager, first download the Android Support Library.

Go to this place and copy the .aar file from here

X: \ Android-SDK \ Extras \ Android \ m2repository \ com \ Android \ support \ recyclerview-v7 \ 21.0.0

Then rename it as a .zip file, then unzip it, then find the classes.jar file, rename it with some kind of proper name, for example, "RecyclerView_v7.jar". Then copy this .jar file to your project library. Add it to build the path, then restart eclipse so that it can be created (not necessary, but I had to do this).

  **=================================Update=======================** 

After new library updates; RecyclerView, CardView, etc. Available as simple library projects.! :)

File ~> Import ~> Existing Android code ~> SDKpath ~> additional ~> Android ~> support ~> v7 ~> recyclerView .

Then right-click on this project, go to properties in Android to check if there is a library . It's done..!

Now open the application in which you want to use recyclerView. goto the properties of your Project application for Android add a library here, you will see that the library project adds that (remember, do not make your application a library project by checking "Is Library"), now go to your project application

Properties ~> Java Build Path ~> Libraries ~> Add Banks ~> RecyclerView LibraryProject ~> libs

Then add this jar to your project and build path.! Pheeew .. :)

+3
source share

All Articles