[英]Using Recyclerview and Cardview WITHOUT Gradle
I am using IntelliJ and have a large number of apps that do not use Gradle
. 我正在使用IntelliJ并且拥有大量不使用Gradle
的应用程序。
I would like to start using the RecycleView
and Cardview
. 我想开始使用RecycleView
和Cardview
。
What is the best way to add these? 添加这些的最佳方法是什么? I have added in the two modules in a similar way to AppCompat
. 我以类似于AppCompat
方式添加了两个模块。
However, when I try to run the code and show the RecycleView
, I get this error... 但是,当我尝试运行代码并显示RecycleView
,我收到此错误...
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
既然你想要它wotk而不在gradle依赖项中添加它们从sdk folder-->extras-->android-->support-->v7
导航到你的sdk位置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. 在这下你会发现recyclerview和cardview文件夹分别将它们添加为库项目,你可以正常进行。 THis can be done in eclipse also 这也可以在日食中完成
Your xml probably looks a bit like this: 你的xml看起来有点像这样:
<Recyclerview....
It needs to look like this: 它需要看起来像这样:
<android.support.v7.widget.RecyclerView....
Sorry if the formatting is off, posting from my phone! 抱歉,如果格式化已关闭,请从我的手机发布!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.