Android import library

我与影子孤独终老i 提交于 2019-12-01 09:08:37

steps

  1. Copy the library file into libs folder
  2. select jar file -> right click -> Build Path -> Add to Build Path
  3. clean the project Project-> Clean -> select your project -> ok

Android Studio

For importing a Android library into Android Studio, use the following steps:

1) (Optional) I like having my main Android project contain everything it needs to compile correctly, so I move external libraries into the libs/ directory. Generally, you only need to keep the following directories:

  • res
  • src
  • AndroidManifest.xml
  • *.iml (This will typically be the name of the library you're importing.)

2) Go to your Project Properties.

3) Go to Modules.

4) Import a New Module (Command + N and then Import Module).

5) Navigate to the library directory you want to import.

6) Create module from existing sources.

7) Click Next three times to add the necessary files.

8) Click Finish to complete the module additional.

9) Click on your project in the module list and go to the Dependencies tab.

10) Click the + button at the bottom and click Module Dependency....

11) Make sure your library you're importing is selected and click OK.

12) Click OK in the Project Properties window.

And you should be good to go.

Copy that library file into libs folder

if u have the source code of the library you can import it in eclipse . Right click on your project -> properties->android -> reference-> add and add the library project which u have imported. This will include only .class files of the library in ur project

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