Appcompat library for android - how it's linked with project

风格不统一 提交于 2019-12-29 02:16:49

问题


In which way is android appcompat library linked with a project (where in code is that connection visible)? I tried to rename it just to see what's gonna happen and my project gave me errors everywhere...

Also, is it possible to somehow use only one appcompat library for all projects?


回答1:


In Eclipse, to share the appcompat libraries across multiple Android projects, do the following:

  1. In Eclipse, select File | Import | Existing Projects into workspace. click Next.

  2. Click Browse, and browse to the directory of Android appcompat directory. The default directory should be: ..\android-sdk\extras\android\support\v7\appcompat\.

  3. Click Finish to add the new project.

  4. Select the Properties tab of an Android project.

  5. In the Properties screen, select the Android option (on the left pane), then click Add, and select the appcompat library from the list.

  6. Click OK to save the changes.

Note: Repeat the above steps if you want to add other shared libraries into your Android projects.

Whereas to embed the appcompat libraries in each of your Android project, just copy the JAR files from the appcompat's libs folder into your project's libs folder.



来源:https://stackoverflow.com/questions/22799478/appcompat-library-for-android-how-its-linked-with-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!