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
- groovy.lang.MissingPropertyException No such property Error
- How to fix java.net.NoRouteToHostException in Android Studio
- Your Android SDK is missing, out of date or corrupted SDK Problem
- [Android Studio] MainActivity does not exist
- [Android Studio] Could not automatically detect an ADB binary
- Android Studio: Cannot perform refactoring operation
- How to Configure Eclipse keymap in IntelliJ IDE
- Android Studio setup was canceled - How to resume
- [Android Studio] Hardcoded string Button, should use @string resource
- The selected device is incompatible : Android Studio
- Android Activity Main xml stuck loading
- Android Studio 1.3 beta now Available for Developers
- Installing Android Studio Dolphin on Mac with Apple (M1/M2) Chip
- Android Studio 4.2 Canary 1 now available
- [Android Studio] Button on click example
- Eclipse like Auto Import Shortcut in Intelij IDE Android Studio
- How to enable line numbers in IntelliJ Android Studio for all files
- Delete Android Studio Projects
- How to update Android Studio
- [Android Studio] Error: Missing system image on device
- macOS Big Sur java.lang.UnsatisfiedLinkError CoreFoundation - Android Studio
- Android [SDK Manager] The system cannot find the path specified
- Failed to install Android.apk on device 'emulator-5554': timeout
- [Solved] Error launching studio
More Posts:
- SharePoint 2016 error - Could not find file ManageUserProfileServiceApplicationTenantSimplified.xml - SharePoint
- Base64 Encoding Decoding in Python Programming - Python
- Fix Microsoft Office 365 error code 135011 - Your organization has disabled this device - Microsoft
- Outlook - The mailbox isn't available. This may have occurred because the license for the mailbox has expired. - Microsoft
- Chrome : When Adobe flash player has finished updating, reload this page to active it - Chrome
- [Fix] zsh: command not found: python on Mac - Python
- [Fix] Docker Run unknown shorthand flag: 'r' in -rm - Docker
- Install SonarLint on Visual Studio Code - HowTos