3

I reinstalled the v7 appcompat library from the SDK manager in Eclipse. However, the library itself is telling me 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?

John-Jack
  • 41
  • 1
  • 6

3 Answers3

14

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

You have to do is to open the project.properties file of the android-support-v7-appcompat and change the target from target=android-19 to target=android-21. The do a Clean for your project, restart your eclipse to take effect.

Community
  • 1
  • 1
ztan
  • 6,861
  • 2
  • 24
  • 44
1

Right mouse click on v7 appcompat library project -> Properties -> Android -> make sure Android 5.0 is selected as Project Build Target.

sergej shafarenka
  • 20,071
  • 7
  • 67
  • 86
0

Its about targeting the correct version of android version.

goto

Window>Android Sdk Manager>

See whether you are having the required version SDK Build Tools which can be found at top section of android sdk manager.

If you updated recently and deleted old Sdk Build tools that can be an issue too.

Please re-install the required tools.

Always remember don't delete the old Sdk Tools after updating to new ones.

Hope this Helps you.

Krishna
  • 170
  • 8