How to add a jar in External Libraries in android studio

Manoj picture Manoj · Sep 4, 2014 · Viewed 304.2k times · Source

I am new to Android Studio. What I need to do is add a few jar files in the External Libraries below the < JDK > folder.

enter image description here

If anyone has knowledge of how to do this, please help me.

Answer

capt.swag picture capt.swag · Feb 6, 2016

A late answer, although I thought of giving an in-depth answer to this question. This method is suitable for Android Studio 1.0.0 and above.


STEPS


  1. First switch your folder structure from Android to Project.

enter image description here

  1. Now search for the libs folder inside app - build folder.

enter image description here

  1. Once you have pasted 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 [You don't have to manually enter this in your build file].

enter image description here

Now you can start using the library in your project.