Adding Gradle to your app

You can Gradle build script dependency to your app in the following way:

Open the file from your app module.

Here, in the dependencies, add the Gradle identifier for a library that you want to import:

Let us consider the current Gradle library, for instance:

com.android.support:appcompat-v7:23.1.1

The components of this Gradle library could be distributed in sections to ease understanding. Here are a few pointers to make note of:

  • com.android.support is the package name of the project
  • appcompat-v7 is the project name ...

Get Expert Android Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.