- Make sure you have downloaded the Android Support Library using the SDK Manager.
- Create a library project and ensure the required JAR files are included in the project's build path:
- Select File > Import.
- Select Existing Android Code Into Workspace and click Next.
- Browse to the SDK installation directory and then to the Support Library folder. For example, if you are adding the
appcompatproject, browse to
- Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
- In the new library project, expand the
libs/folder, right-click each
.jarfile and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the
android-support-v7-appcompat.jarfiles to the build path.
- Right-click the library project folder and select Build Path > Configure Build Path.
- In the Order and Export tab, check the
.jarfiles you just added to the build path, so they are available to projects that depend on this library project. For example, the
appcompatproject requires you to export both the
- Uncheck Android Dependencies.
- Click OK to complete the changes.
- Example of using ActionBarCompat with android-support-v7-appcompat