例子里这个工程的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选择同样等级
本文介绍了解决Android项目中出现的“error:Error:No resource found that matches the given name: attr 'android:actionModeShareDrawable'”错误的方法。首先需要将项目的target由19更改为21,并更新project.properties文件。如果问题依旧存在,则需要确保appcompat版本是最新的,或通过SDK Manager更新所有的support包。另一种解决方案是在创建项目时设置API等级一致。

被折叠的 条评论
为什么被折叠?



