So I want to follow the book's configuration to create a new Criminalintent app that supports the following version of 3.0, using the Android-suppot-v4.jar support library to use fragment.
When you create a new project, Eclipse automatically generates the APPCOMAT_V7 project with an error similar to the following
Error:error Retrieving parent for item:no Resource found that matches the given name ' Android:Widget.Material.Action Button '. STYLES_BASE.XML/APPCOMPAT_V7/RES/VALUES-V21
Found a solution on the stackflow.
Solution 1, use the android SDK Manager to download the latest 5.0SDK 2, project.properties in appcomat_v7 to modify target=android-19 to Target=android-21 3, Select the project file, right-click, select Use 5.0 in Properties->android and check the is Library then apply 4, clean the project, the R file will be generated automatically, you can continue to write code.
Although the problem is solved, I can't understand why we must support the latest version of the SDK to develop it? Can't you develop it according to your target SDK? For those who know the reason, please leave a comment.
APPCOMAT_V7 Error Resolution