Step wise
- Copy the JAR file to the libs folder
- Register the module in the build.gradle file, the instructions for which are given in steps 3 to 9
- Open the file menu and click on the project structure.
- Now in the Project Structure dialog box, select the application in the module
- Now click the Dependencies tab in the project structure dialog box.
- Click the + sign in the right corner.
- Select "File Dependency" in the list.
- Select jar file from libs folder
- Click Apply and Ok
- Finally click gradle sync button
One more thing, check for a proxy connection if you are using it.
source share