How to import external library in android studio?

后端 未结 3 1165
独厮守ぢ
独厮守ぢ 2021-02-10 04:05

I struggle to import library \'PageSlidingTapStrip\'(https://github.com/astuetz/PagerSlidingTabStrip).

I found this question(How to import eclipse library project from g

3条回答
  •  逝去的感伤
    2021-02-10 04:36

    For update up to Android Studio 1.2.1.1

    There are basically three types of dependencies which we have to add in project of android Studio

    Add Normal Dependencies like Support files

    1. Right click on project->open module settings
    2. Select dependencies->Now press right "+" icon button ->Select library Dependencies
    3. Enter Name and Search
    4. Select file and press ok button.

    Add Git Hub Dependencies

    Find the dependencies of git repository for example compile 'com.jakewharton:butterknife:6.1.0' from https://github.com/JakeWharton/butterknife

    A. open build.gradle(module:app) file
    B. Add lines compile 'com.jakewharton:butterknife:6.1.0'
    

    OR

    Follow as describe above in Normal Dependencies Step by just enter dependencies in search bar

    Add Jar files Dependencies

    1. Right click on project->open module settings
    2. press left "+" icon (insert new Module) button -> Select import Jar or .AAR package->browse Jar file and finish
    3. Now select dependencies-> press right "+" icon button ->Select module Dependencies->select jar files->press ok button.

提交回复
热议问题