To import an external .jar file in your Android Studio Project, just follow the below steps,
- Move from Android view to Projects view
- Now under app folder you should see libs, if you don't see it, create it
- Drag & Drop the .jar file here, you maybe get a prompt "This file does not belong to the project", just click OK
- 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"
- 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 'com.android.support:appcompat-v7:21.0.3'
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
More Posts related to Android-Studio,
- Locate MainActivity Java or Kotlin file in Android Studio
- Android Studio setup was canceled - How to resume
- The selected device is incompatible : Android Studio
- Android Studio : Change FAB icon color : FloatingActionButton
- How to rename package name in Android Studio
- Android Emulator Screenshot saved location
- Android Activity Main xml stuck loading
- [Solution] Android Studio does not displays Toolbar in Layout Design
- [Event Log] Android Studio performance could be improved
- The package must have at least one . separator [Android Studio]
- Android Studio SDK Build-tools 23 rc2 not getting installed
- Android Emulator window was out of view and was recentered
- Emulator: Warning: restoring GLES1 context from snapshot. App may need reloading.
- How to Import External Jars to Android Studio Project
- How to install Android Studio Chipmunk and SDK tools on macOS (2021.2)
- Create assets folder in Android Studio
- Eclipse like Auto Import Shortcut in Intelij IDE Android Studio
- Android Emulator 5.1.1 not loading on Mac OS X Android Studio
- Your Android SDK is missing, out of date or corrupted SDK Problem
- macOS Big Sur java.lang.UnsatisfiedLinkError CoreFoundation - Android Studio
- [Android Studio] How to locate code for activity_main.xml
- groovy.lang.MissingPropertyException No such property Error
- Installing Android Studio Dolphin on Mac with Apple (M1/M2) Chip
- Step-by-Step: How to install Flutter in Android Studio
- [Solved] Error launching studio
More Posts:
- How to comment out a block of code in Python - Python
- Upload a File in Microsoft SharePoint using PowerShell Script - SharePoint
- How to remove JetBrains Toolbox from Mac Startup - HowTos
- Using Document Map in Notepad++ - NotepadPlusPlus
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python] - Python
- How to Run PowerShell Script (Mac/Windows/Linux) - Powershell
- Java SE JDBC with Prepared Statement Parameterized Select Example - Java
- How to Initialize ArrayList Java with Values - Java