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,
- Your Android SDK is missing, out of date or corrupted SDK Problem
- Use Netbeans keyboard shortcuts in Android Studio
- Android Studio NoClassDefFoundError: java.awt.Toolkit
- Create assets folder in Android Studio
- Cannot start Android Studio. No JDK found
- Android Studio emulator/Device logCat logs not displayed
- Android Studio : Implement abstract methods shortcut
- Android Studio 4.2 Canary 1 now available
- Error running 'app': No target device found.
- How to Search Something (string) in Android Studio Project like Eclipse
- Android Studio : Connection Error : Failed to download patch file
- How to enable line numbers in IntelliJ Android Studio for all files
- Building library Gradle Project Info: Downloading services.gradle.org
- AVD Pixel_2_API_15 is already running. [Android Studio]
- How to update Android Studio
- [Android Studio] failed to find Build Tools revision 23.0.0 rc1
- Android Studio SDK Build-tools 23 rc2 not getting installed
- The package must have at least one . separator [Android Studio]
- Android activity main xml stuck loading
- Delete Android Studio Projects
- Failed to install Android.apk on device 'emulator-5554': timeout
- Android Studio java.net.NoRouteToHostException
- Eclipse like Auto Import Shortcut in Intelij IDE Android Studio
- Android Emulator window was out of view and was recentered
- How to remove Floating Action Button Android Studio Blank Activity Template
More Posts:
- Android : Error in http connection java.net.SocketException: Permission denied - Android
- How to create Toast messages in Android - Android
- How to Search Something (string) in Android Studio Project like Eclipse - Android-Studio
- How to detect Browser and Operating System Name and Version using JavaScript - JavaScript
- Free Unlimited Calls from MTNL & BSNL Landlines from 1st May 2015 - HowTos
- Adding internet permission to Android Project - Android
- How to turn off Facebook autoplay videos on timeline - Facebook
- Android : How to make TextView Scrollable - Android
- Sharepoint Server 2016 installation Prerequisites with download links - SharePoint
- How to get current URL Location using Javascript HTML - JavaScript
- Android Toast position top - Android
- How to submit website to dmoz directory - HowTos
- SharePoint Server 2016 setup error - A system restart from a previous installation or update is pending. Restart your computer and run setup to continue. - SharePoint
- Java XML-RPC 3.1.x based web service example - Java
- Plug-in com.android.ide.eclipse.adt was unable to lead class Error - Android