Asaf Nevo
Asaf Nevo

Reputation: 11688

Android support v7 can't find ActionBarActivity

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

Upvotes: 13

Views: 28719

Answers (3)

Hadi Salehy
Hadi Salehy

Reputation: 947

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

Upvotes: 6

Dpedrinha
Dpedrinha

Reputation: 4220

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.

Upvotes: 7

Sinu Varghese
Sinu Varghese

Reputation: 800

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.

Upvotes: 1

Related Questions