例子里这个工程的target是19,需要改为21才能正确编译,否则提示“error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.”。具体方法是修改project.properties文件,将target=19改为target=21,然后clean此工程或重启eclipse即可。
若仍然无法编译,可能是appcompat的版本不是最新,请通过sdk manager将support包全部升级到最新版
或者用一个特殊的解决方式,就是创建项目时所有API选择同样等级