Android import library

前端 未结 4 1781
粉色の甜心
粉色の甜心 2021-01-14 06:38

In my project, I need to use external library. That library consists of .class files. I have added folder with this library to my project using properti

相关标签:
4条回答
  • 2021-01-14 07:12

    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
    0 讨论(0)
  • 2021-01-14 07:13

    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.

    0 讨论(0)
  • 2021-01-14 07:19

    Copy that library file into libs folder

    0 讨论(0)
  • 2021-01-14 07:19

    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

    0 讨论(0)
提交回复
热议问题