Adding external library in Android studio

前端 未结 19 1361
面向向阳花
面向向阳花 2020-11-22 05:51

I want to add external library https://github.com/foursquare/foursquare-android-oauth to my Android application (I use Android Studio, the instructions provided by lib autho

19条回答
  •  不知归路
    2020-11-22 06:30

    A late answer, although I thought of giving an in-depth answer to this question. This method is suitable for Android Studio 1.0.0 and above.

    STEPS

    1. First switch your folder structure from Android to Project.

    1. Now search for the libs folder inside app - build folder.

    1. Once you have pasted the .jar file inside libs folder. Right click on the jar file and at end click on Add as library. This will take care of adding compile files('libs/library_name.jar') in build.gradle [You don't have to manually enter this in your build file].

    Now you can start using the library in your project.

提交回复
热议问题