简体   繁体   中英

Using Recyclerview and Cardview WITHOUT Gradle

I am using IntelliJ and have a large number of apps that do not use Gradle .

I would like to start using the RecycleView and Cardview .

What is the best way to add these? I have added in the two modules in a similar way to AppCompat .

However, when I try to run the code and show the RecycleView , I get this error...

android.view.InflateException: Binary XML file line #8: Error inflating class RecyclerView

Any help greatly appreciated.

Since you wanted it to wotk without adding them in gradle dependency navigate to your sdk location from that sdk folder-->extras-->android-->support-->v7

under this you will find recyclerview and cardview folders add them as library pojects respectively and you can proceed normally. THis can be done in eclipse also

Your xml probably looks a bit like this:

<Recyclerview.... 

It needs to look like this:

<android.support.v7.widget.RecyclerView....

Sorry if the formatting is off, posting from my phone!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM