13

I've used all the manuals available and finally i was managed to add the v7 support to my android version 2.3 project.

I'm trying to add ActionBarActivity but it can't be found.. although ActionBar is found...

This is me trying to get ActionBarActivity.

enter image description here

This is my SDK Manager enter image description here As you can see i can import the v7 path, but doesn't have the ActionBarActivity

Zain
  • 37,492
  • 7
  • 60
  • 84
Asaf Nevo
  • 11,338
  • 23
  • 79
  • 154
  • ActionBarActivity was introduced in revision 18. It seems like you have older version 13 jar file. Download latest version from SDK – Anirudh Oct 06 '13 at 16:07
  • i've download the lateset revision using Android SDK Manager – Asaf Nevo Oct 06 '13 at 16:15
  • Note: `ActionBar` is under `android.support.v7.app`. – Paul Burke Oct 06 '13 at 16:16
  • Can you please post screenshot of SDK Manager?. – Anirudh Oct 06 '13 at 16:16
  • From screenshot, you have latest revision. Can try suggestion by Paul because it's available here http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.3_r2.1/android/support/v7/app/ActionBarActivity.java – Anirudh Oct 06 '13 at 16:35

3 Answers3

7

Delete the support v4 jar file in your project/lib folder.

You can have it there and work with the support v7 lib, but v7 already has a v4 lib and they must have the same version to work.

Remove the v4 jar file, then add the v7.

Dpedrinha
  • 3,741
  • 3
  • 38
  • 57
6

You have to be in the new version, Android.Support.V7 Inherit from this class Android.Support.V7.App.AppCompatActivity

 public class MainActivity : Android.Support.V7.App.AppCompatActivity
Hadi Salehy
  • 917
  • 11
  • 10
1

New v7 appcompat library: Added ActionBar to allow implementation of the action bar user interface design pattern back to Android 2.1 (API level 7) and higher. Use of this class requires that you implement your activity by extending the new ActionBarActivity class.

Sinu Varghese
  • 800
  • 1
  • 14
  • 39