Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

Show the video description

Dagger 2 is a dependency injection framework for Android and Java that is developed by Google. In this tutorial, we will step by step learn how to use Dagger 2 and why we need it.

In part 1, we will learn what a dependency is, what injection means, and what benefits dependency injection provides in terms of code coupling, testability and single responsibility principle. We will also learn what new problems dependency injection brings up and how Dagger 2 can help us get rid of them while still reaping the benefits of dependency injection.