Android Studio – Add External Jar to Library (Project Dependencies)
There are many external libraries available that make many specific tasks simple and easy with the APIs and Classes they provide. In this tutorial, we shall learn how to import an External Jar file to the Project Module Dependencies in Android Studio.
For the demo purpose, we shall take a jar file named svg-android-1.1.jar.
To add an external jar to Project Module Dependencies
- Open Project Window and drop your jar file in libs folder under app.
- Open Project Structure.
- In the left panel, under Modules, click on app, Click on Dependencies Tab. On the right side,+ symbol would appear.
- Click on Jar Dependency
- Browse the Jar file under libs directory.
- The jar file would be added to the dependencies.
- Once you click OK, Gradle Project Sync starts and Build happens.
We have successfully added the jar file to Project Dependencies and you may use the classes in it.
In this Kotlin Android Tutorial, we have learnt how to add an external jar file to Project Module Dependencies.