Android import library

前端 未结 4 1785
粉色の甜心
粉色の甜心 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: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.

提交回复
热议问题