The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Dependencies

While you are writing some code for an app, the vast majority of the code that is the app comes from other developers. Some might be teammates on your development team, but far more comes from outsiders: Google and other Android developers.

Some of this you have seen already. You did not write Activity, TextView, and similar classes. Instead, they came from the Android SDK, written (primarily) by Google.

Beyond the Android SDK, though, there are thousands of libraries that developers have access to, including many from Google itself. We add these as dependencies in our projects, to use their code alongside ours.

What’s a Dependency?

Roughly speaking, the code and assets that make up an app come from three sources.

The source that you tend to focus on personally is the code that you and people that you know are writing for this app.

There is the source that comes from your compileSdkVersion, representing the Android SDK that you are linking to.

Everything else, generally speaking, is a dependency.

From a pure technical standpoint, dependencies are listed in build.gradle files in dependencies closures.

Dependency Scopes

The preview of this section will not appear here for a while, due to a time machine mishap.

Depending on a Local JAR

The preview of this section is sleeping in.

What’s an Artifact?

The preview of this section was eaten by a grue.

Artifacts and Repositories

The preview of this section was abducted by space aliens.

Major Library Families from Google

The preview of this section will not appear here for a while, due to a time machine mishap.

Requesting Dependencies

The preview of this section was lost due to a rupture in the space-time continuum.

The Android Support Library

The preview of this section was eaten by a grue.