S-K'
S-K'

Reputation: 3209

Where can I find android-v7 support library jar

I want to use the new ActionBarActivitiy class from the v7 support library but I cannot find the support JAR anywhere. I have a v7 folder in my extras directory but it contains 3 directories and not a jar

Upvotes: 10

Views: 37041

Answers (3)

sergej shafarenka
sergej shafarenka

Reputation: 20406

In Eclipse right click on on your Project -> Android Tools -> Add Support Library... and follow the instructions. As the result, required jar-file gets copied into your project's libs folder. Or you can add libraries manually how it is described in Android documentation.

Update 1: Android Tools team has made some changes to the way support library is integrated.

Android updates do this a bit different. There is still Android Tools -> Support Library option, but now it behaves a bit different. Once activated, Eclipse will silently create a new project called appcompat_v7 or similar. The name might change in the next versions of ADT. You must be able to find this project in your workspace. This project contains android-support-*.jar file. This is a new library project. In turn, your project receives a dependency on that library project.

You can stay with the updated configuration "as is" and start using compatibility API. Or alternatively, you can copy android-support-*.jar files into your project's lib folder and remove dependency on appcompat_v7 library project. Both options will work just fine.

Update 2: They change this behavior quite often. Try Project -> Android Tools -> Add Support Library... first. If it doesn't work, please check out official documentation for more recent information.

Update 3: It is really worth to migrate to Android Studio to avoid multiple issues with ATD nowadays.

Upvotes: 11

Pavlos
Pavlos

Reputation: 2181

You have to update your Support Library through your SDK and then navigate to the folder where your SDK is located! Then go to : Extras->Google and you will find the Project and the jar included!

Upvotes: 3

CommonsWare
CommonsWare

Reputation: 1006654

ActionBarActivity is in an Android library project, not a JAR. There are instructions in the Android developer documentation for how to add an Android library project to your environment and attach it to your application project.

Upvotes: 8

Related Questions