Explain in detail how to add recyclerview-v7 support package in Android studio

I've always known that recyclerview can replace listview and GridView. I've heard that it has powerful functions, but I haven't learned it yet. I wanted to study today, but I didn't expect to hit the wall before I started. Enter recycler. There are only these two things. There is no prompt for recyclerview, indicating that there is no in the support package.

After the last Baidu, it was finally solved (I can't imagine how to develop and solve the problem without the network).

1. Open the SDK manager, find the Android support library under the extras tree, and download the support package. Recyclerview came out in v7-21. I don't need to update here. The description is the latest. How can it not?

2. Check the build.gradle of the app. The V7 versions inside are also 23.2.1

3. Open external libraries and directly find the class, but there is no

4. View the properties of appcompat-v7-23.2.1, and the location of source code references in it, in the SDK Directory: \ extras \ Android \ m2repository \ com \ Android \ support \ appcompat-v7 \ 23.2.1 \ appcompat-v7-23.2.1-sources.jar

5. After opening the above directory, I found appcompat-v7, and the latest version is 23.2.1

6. According to the idea of step 2, try to compile directly to see if it is OK. According to the directory structure, a sentence is added at the end of the dependencies of build.gradle of the app: compile 'com. Android. Support: recyclerview-v7: 23.2.1'

7、Build――Clean Project。 After the clean is completed, I see the expected recyclerview in external libraries

8. If you can import the package, write code

Android-support-v7-recyclerview.jar is found in the \ extras \ Android \ support \ V7 \ recyclerview \ LIBS directory. If the above method doesn't work, this is the second solution. You can import it directly into LIBS

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>