0

I want to add third party sdk in my android project. Can anyone tell me the process step by step.... I tried but can't... My Process:

  1. Copy and paste jar file in libs folder
  2. Add dependency in build.gradle file
  3. then clean the project and build
Md. Zakir Hossain
  • 1,082
  • 11
  • 24
Saim Saddat
  • 38
  • 1
  • 1
  • 8
  • 4
    Possible duplicate of [The best way to integrate third party library in Android studio](http://stackoverflow.com/questions/18555135/the-best-way-to-integrate-third-party-library-in-android-studio) – Gino Mempin Oct 08 '16 at 16:19

2 Answers2

6

You can try below methods :

First method:

  1. switch your folder structure from Android to Project.-> paste 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 after sync gradle -> make sure compile files('libs/library_name.jar') added your build.gradle file -> Then build your project

Second method:

2.(If 1st method does not work for you then try it.) switch your folder structure from Android to Project.-> paste the .jar file inside libs folder->Select Dependencies Tab, add the file by using + .Click on file dependency and Select your jar file from libs directory.->Then click OK->This will take care of adding compile files('libs/library_name.jar') in build.gradle after sync gradle -> make sure compile files('libs/library_name.jar') added your build.gradle file -> Then build your project.

Md. Zakir Hossain
  • 1,082
  • 11
  • 24
0

Open the Android SDK Manager. At the tools tab selecct Manage Add-on Site. Then go to the User Defined Sites tab and click new. A the prompt dialog enter the URL you wish to add. Then close the window. Back at the Android SDK Manager scroll down and u should be able to locate the SDK u added. If needed at the packages tab of the SDK Manager click Show Archive Details

Giannis
  • 121
  • 2
  • 4
  • 13