0

Hi i have problem in creating a new project in eclipse. I have errors in both android support library and in my project. I tried removing the library project and added again as said by many websites. But Still end up with errors. Please guide me in thisenter image description here

SDK Screenshot

enter image description here

Vivek Shankar
  • 691
  • 3
  • 14
  • 48
  • possible duplicate of [appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable'](http://stackoverflow.com/questions/26431676/appcompat-v721-0-0-no-resource-found-that-matches-the-given-name-attr-andro) – reVerse Nov 01 '14 at 10:08

4 Answers4

1

Right click on appcompat project and change the build version to android-5.0.

You have appcompat library which is having values-v21.

So, change the build version of android from 4.4.2 to 5.0

Harsha Vardhan
  • 3,324
  • 2
  • 17
  • 22
1

The issue is that the support library has updated definitions for Android 5.0 (Lollypop). Since resource folders such as values-v21 and layout-v21 have been defined in the support library, both your application and appcompat projects do not know API 21 since your build target is set for an older version of Android.

To resolve this, you need to make sure that both your application and the appcompat projects have the build target set to Android 5.0 since the support library has updated values for the new Material theme that has been backported. It is a good idea to always target the latest versions so that you don't run into these issues with future updates to the support library.

You can do this in Eclipse by:

  1. Right-click the project folder and select Properties
  2. Select Android on the side menu
  3. Select Android 5.0 as the Project Build Target

Eclipse Project Settings for Android Project

You may need to download the Android 5.0 (API 21) SDK Platform in the SDK manager if you cannot find the Android 5.0 target.

Matthew Kairys
  • 486
  • 4
  • 9
0

Try to add the library via Right click project -> Android Tools -> Add Support Library

Piyush
  • 18,895
  • 5
  • 32
  • 63
Blaze Tama
  • 10,828
  • 13
  • 69
  • 129
0

Try these steps.

  1. Delete the android-support-v7-appcompat project (from the workspace, leave it on the disk)

  2. Delete the android-support-v7-appcompat project (from the workspace, leave it on the disk)

  3. Go to your project and select Properties -> Android, and remove android-support-v7-appcompat from your references.

  4. Perform clean

  5. Re-import android-support-v7-appcompat.

  6. Re-add appcompat as a reference for your project again.

  7. Perform another clean of the project

Ojonugwa Jude Ochalifu
  • 26,627
  • 26
  • 120
  • 132