Advertisement
kellykamay

Untitled

Feb 21st, 2014
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. Create a library project based on the support library code:
  2.  
  3. 1.Make sure you have downloaded the Android Support Library using the SDK Manager.
  4. 2.Create a library project and ensure the required JAR files are included in the project's build path:
  5. a. Select File > Import.
  6. b. Select Existing Android Code Into Workspace and click Next.
  7. c. Browse to the SDK installation directory and then to the Support Library folder. For example, if you are adding the appcompat project, browse to <sdk>/extras/android/support/v7/appcompat/.
  8. d. Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
  9. e. In the new library project, expand the libs/ folder, right-click each .jar file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path.
  10. f. Right-click the library project folder and select Build Path > Configure Build Path.
  11. g. In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.
  12. h. Uncheck Android Dependencies.
  13. i. Click OK to complete the changes.
  14.  
  15. You now have a library project for your selected Support Library that you can use with one or more application projects.
  16.  
  17. Add the library to your application project:
  18.  
  19. 1.In the Project Explorer, right-click your project and select Properties.
  20. 2.In the category panel on the left side of the dialog, select Android.
  21. 3.In the Library pane, click the Add button.
  22. 4.Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
  23. 5.In the properties window, click OK.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement