At some point during your project, you may need to add JAR files, which are package Java files, to your app. In this video, we'll discuss the multiple ways you can go about adding JAR files with dependencies and modules to your Android app, as well as how you activate the JAR file once it's been added to Android Studio.
As with all Java based app environments,…you can add JAR files to an Android app.…A JAR file is a predefined Java library.…Android Studio gives you a couple…of different ways of doing this.…I'll show you two different options.…And I'll work in a brand new project that I'll create here.…I'll click New Project, and I'll call this Simple App.…I'll accept the default minimum SDK,…and I'll build the project from the blank activity template.…
I'll finish, and create the project.…Now, how you create the project…depends on how you're going to use it.…If you're working on a single project…and you're just using the JAR file once,…you can use a very simple workflow,…where you copy the JAR file…into the project directory structure,…and then add it as a library.…If you're going to be sharing the JAR file…among multiple projects,…there's another approach that you can use.…I'll start with the first and simplest approach.…
You can use any JAR file.…I'm using this one, jdom-2.0.5.…This is one of my favorite external libraries.…It's an XML parsing and creation library…
Note: This course was revised on 8/20/2014 to reflect changes in the .0.8.4 beta version of Android Studio.
- Exploring Android Studio and IntelliJ IDEA
- Installing Android Studio
- Creating projects with Android Studio
- Navigating the user interface
- Designing activity layouts
- Analyzing and refactoring code
- Debugging and packaging apps
Skill Level Beginner
Q: This course was updated on 8/20/2014. What changed?
A: We revised this course to reflect changes to the Android Studio beta, released at the 2014 Google I/O conference. This update was recorded with Android Studio .0.8.4, which contains a new project wizard and updates to the Gradle build system. For more information about the changes in this course, check out the "What's new in this update" movie.