How do you add a dependency in Gradle?

To add a dependency to your project, specify a dependency configuration such as implementation in the dependencies block of your module’s build. gradle file . This declares a dependency on an Android library module named “mylibrary” (this name must match the library name defined with an include: in your settings.

Read more