Android Support Library appcompat v7: Cannot find resource actionModeShareDrawable

I reinstalled appcompat v7 library from SDK manager in Eclipse. However, the library itself says that errors exist in several different xml files.

This is one of the theme files:

<resources>

<style name="Base.V14.Theme.AppCompat" parent="Base.V11.Theme.AppCompat" />
<style name="Base.V14.Theme.AppCompat.Light" parent="Base.V11.Theme.AppCompat.Light" />
<style name="Base.V14.Theme.AppCompat.Dialog" parent="Base.V11.Theme.AppCompat.Dialog" />
<style name="Base.V14.Theme.AppCompat.Light.Dialog" parent="Base.V11.Theme.AppCompat.Light.Dialog" />

<style name="Base.Theme.AppCompat" parent="Base.V14.Theme.AppCompat">
    <item name="android:actionModeCutDrawable">?actionModeCutDrawable</item>
    <item name="android:actionModeCopyDrawable">?actionModeCopyDrawable</item>
    <item name="android:actionModePasteDrawable">?actionModePasteDrawable</item>
    <item name="android:actionModeSelectAllDrawable">?actionModeSelectAllDrawable</item>
    <item name="android:actionModeShareDrawable">?actionModeShareDrawable</item>
</style>

<style name="Base.Theme.AppCompat.Light" parent="Base.V14.Theme.AppCompat.Light">
    <item name="android:actionModeCutDrawable">?actionModeCutDrawable</item>
    <item name="android:actionModeCopyDrawable">?actionModeCopyDrawable</item>
    <item name="android:actionModePasteDrawable">?actionModePasteDrawable</item>
    <item name="android:actionModeSelectAllDrawable">?actionModeSelectAllDrawable</item>
    <item name="android:actionModeShareDrawable">?actionModeShareDrawable</item>
</style>

<style name="Base.Theme.AppCompat.Dialog" parent="Base.V14.Theme.AppCompat.Dialog">
    <item name="android:actionModeCutDrawable">?actionModeCutDrawable</item>
    <item name="android:actionModeCopyDrawable">?actionModeCopyDrawable</item>
    <item name="android:actionModePasteDrawable">?actionModePasteDrawable</item>
    <item name="android:actionModeSelectAllDrawable">?actionModeSelectAllDrawable</item>
    <item name="android:actionModeShareDrawable">?actionModeShareDrawable</item>
</style>

<style name="Base.Theme.AppCompat.Light.Dialog" parent="Base.V14.Theme.AppCompat.Light.Dialog">
    <item name="android:actionModeCutDrawable">?actionModeCutDrawable</item>
    <item name="android:actionModeCopyDrawable">?actionModeCopyDrawable</item>
    <item name="android:actionModePasteDrawable">?actionModePasteDrawable</item>
    <item name="android:actionModeSelectAllDrawable">?actionModeSelectAllDrawable</item>
    <item name="android:actionModeShareDrawable">?actionModeShareDrawable</item>
</style>

</resources>

      

And the error:

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

      

Any thoughts?

+3


source to share


3 answers


The Eclipse section of this answer may help you solve the problem.



You need to open project.properties file

android-support-v7-appcompat

and change the target from target=android-19

to target=android-21

. Make "Clean" for your project, restart your eclipse to take effect.

+14


source


Right click on v7 project appcompat library -> Properties -> Android -> make sure Android 5.0 is selected as project build object.



+1


source


About setting up the correct Android version.

goto

Window> Android Sdk Manager>

See if you have the required SDK Build Tools version which can be found at the top of the Android sdk manager.

If you've recently updated and uninstalled the old Sdk build tools, this could be a problem too.

Please reinstall the required tools.

Always remember not to uninstall old Sdk tools after upgrading to new ones.

Hope this helps you.

0


source







All Articles