No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

在用AndroidStudio编程,引入v7包的依赖时,报了下面这个错误:

No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

意思是没有找到  'android:actionModeShareDrawable'. 这个资源


后来在stackoverflow中找到了类似问题的一个简单解决方法:

No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

No resource found that matches the given name: attr 'android:actionModeShareDrawable'.


注意:为了避免出现上述错误,要确保gradle中的下面这两个数字要保持一致!

No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

在用eclipse编译的时候,一定要注意将v7包和要编译的工程做如下设置

No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

这里要确保目标版本一致