问题
I am trying to use cardview in my project.
I downloaded google play services and imported cardview as a library in my project.
After that I am getting the below error:
Resource id 0x7f070001 is not of type STYLE (instead color)
Any help would be appreciated as earliest.
回答1:
I too faced the same issue while using eclipse adt and this is what worked for me.
Steps
- Have app_compat_v7 as a library project in the workspace
- Import android card_view as a library in the workspace
- Now create your new project and link and build completely all the three projects
In case you have already created all the three projects and it is still not working then try these steps
- close the main project
- close the card_view project
- Now remove the bin folder of the app_compat_v7 library and build the project.
- Next open the card_view project and build both the libraries
- Then open the main project and build all the three projects
- The error still remains. Restart eclipse. That's it.
This worked for me and hope it will work for you as well. Enjoy :)
来源:https://stackoverflow.com/questions/26700970/error-while-inflating-cardview