Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 745
Asaf Nevo Avatar asked Oct 06 '13 16:10

Asaf Nevo


3 Answers

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.

like image 149
Dpedrinha Avatar answered Nov 07 '22 04:11

Dpedrinha


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
like image 43
Hadi Salehy Avatar answered Nov 07 '22 06:11

Hadi Salehy


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.

like image 1
Sinu Varghese Avatar answered Nov 07 '22 05:11

Sinu Varghese