Android CardView 在eclipse中如何构建项目


原文:http://stackoverflow.com/questions/26494346/error-inflating-class-and-android-support-v7-widget-cardview

I guess I can answer my own question.

Go to File -> Import -> Existing Android code into workspace --> Browse (Go to sdk/extras/android/support/v7/cardview) --> Click ok --> Click Finish

Your project explorer will now show cardview as a project.

Right click on cardview project --> Properties --> Android(Left Pane) --> Enable isLibrary (tick the checkbox) --> Apply --> ok

Now Right click on your project --> Properties --> Android(Left pane) --> Add (under library) --> cardview --> apply --> ok

Now right click on your project again --> build path --> configure build path --> Under projects tab, add cardview

You are done


顺着步骤来,但是还是报错,最后在CardView项目上再次引用android-support-v7-appcompat即可成功使用CardView

你可能感兴趣的:(Android)