From the course: Android Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Manage versioning with Gradle variables

Manage versioning with Gradle variables - Android Tutorial

From the course: Android Development Tips

Manage versioning with Gradle variables

- [Instructor] When your Android app uses multiple support libraries, you have to carefully manage the library versions in your Gradle files. There are a few ways of doing this, and in this tip I'm going to show you how to use Gradle variables so you can declare a version number once and then use it multiple times. In this starting app, I'm declaring three support libraries, the app compat library, design, and support vector drawable. And in this app, I'm targeting API level 25, declared up here in the target SDK version and the compile SDK version. My library major versions have to match that. But to make things a little bit easier, I'm using what are known as dynamic versions. The plus character means whatever is the most recent version. Now this is great for training content for sample applications, but for a real production application, you don't want to do this. You always want to be very specific as to which version of the libraries you're using, so you don't have unanticipated…

Contents