Saim Saddat
Saim Saddat

Reputation: 38

How to add third party SDK in android studio

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

Upvotes: 0

Views: 12111

Answers (2)

Md. Zakir Hossain
Md. Zakir Hossain

Reputation: 1092

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.

Upvotes: 6

Giannis
Giannis

Reputation: 121

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

Upvotes: 0

Related Questions