How to Import External Jars to Android Studio Project

To import an external .jar file in your Android Studio Project, just follow the below steps,

  1. Move from Android view to Projects view

  2. Now under app folder you should see libs, if you don't see it, create it
  3. Drag & Drop the .jar file here, you maybe get a prompt "This file does not belong to the project", just click OK
  4. Now you should see the jar file under libs folder, right-click on the jar file and select "Add as Library", Click OK for prompt "Create Library"
  5. That's it!! Now, this jar has been added.

?? We do not need to add the dependency in build.gradle manually unlike previous versions of Android Studio. But to verify, just move to the Android Project View again and check Gradle Scripts -> build.gradle , you should be able to see the jar added under dependencies, nineoldandroids-2.2.0.jar is the jar that I have added.

Gradle example importing jars in Android Studio:
dependencies {
   compile fileTree(dir: 'libs', include: ['*.jar'])
    compile ''
    compile files('libs/nineoldandroids-2.2.0.jar')

⚡️ Note that the process to add an external Project Folder to an Android Studio Project is not the same.

add to library
add to library
Try Out Code2care Dev Tools:


Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR -