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

Step 1: Open Project Window and drop your jar file in libs folder under app.

Android Add external Jar to Project Dependencies

Step 2: Open Project Structure.

Android Add external Jar to Project Dependencies

Step 3: In the left panel, under Modules, click on app, Click on Dependencies Tab. On the right side,+  symbol would appear.

Android Add external Jar to Project Dependencies

Step 4: Click on Jar Dependency

Android Add external Jar to Project Dependencies

Step 5: Browse the Jar file under libs directory.

Android Add external Jar to Project Dependencies

Step 6: The jar file would be added to the dependencies.

Android Add external Jar to Project 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.

Conclusion

In this Kotlin Android Tutorial, we have learnt how to add an external jar file to Project Module Dependencies.