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,
- Error running 'app': No target device found.
- How to save IntelliJ IDE Console logs to external log file
- Android Studio : Implement abstract methods shortcut
- Android Studio Error:(19, 0) Gradle DSL method not found: android()
- Android [SDK Manager] The system cannot find the path specified
- [Solution] Android Studio does not displays Toolbar in Layout Design
- [Android Studio] failed to find Build Tools revision 23.0.0 rc1
- [Android Studio] Hardcoded string Button, should use @string resource
- JDK Location in Android Studio
- Android Studio : Connection Error : Failed to download patch file
- Your Android SDK is missing, out of date or corrupted SDK Problem
- Cannot start Android Studio. No JDK found
- Android Studio : Build Tools 23.0.0 rc1 is deprecated
- Android Studio emulator/Device logCat logs not displayed
- Delete Android Studio Projects
- Android Studio : Change FAB icon color : FloatingActionButton
- How to install Android Studio Chipmunk and SDK tools on macOS (2021.2)
- Building library Gradle Project Info: Downloading services.gradle.org
- [Android Studio] Could not automatically detect an ADB binary
- The package must have at least one . separator [Android Studio]
- Create assets folder in Android Studio
- How to remove Floating Action Button Android Studio Blank Activity Template
- [Event Log] Android Studio performance could be improved
- The selected device is incompatible : Android Studio
- Disabling Spell Check in Android Studio
More Posts:
- What is CA FE BA BE 00 00 00 3D in Java Class Bytecode - Java
- Common Microsoft Teams sign in errors and how to fix - Teams
- Portable Notepad++ for windows - NotepadPlusPlus
- Twitch chat down, error loading data, content unavailable, streaming problem - News
- How to check if a port is in use using terminal [Linux or macOS] - MacOS
- How to enable Do Not Disturb mode for Notification Center in Mac OS X 10.10 Yosemite - Mac-OS-X
- Using Java 8 Month Enum with Examples - Java
- Change Android Toast background color - Android