# Errata for Dagger by Tutorials, 1st ed

**URL:** <https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415>\
**Category:** Dagger by Tutorials\
**Created:** [November 20, 2020, 7:30pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415 "2020-11-20T19:30:45Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mandafrederick](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mandafrederick/32/102369_2.png) [@mandafrederick](https://forums.kodeco.com/u/mandafrederick)\
**Post date:** [November 20, 2020, 7:30pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/1 "2020-11-20T19:30:45Z")

</div>

Creating this topic to catch any typos and bugs in the 1st Edition of Dagger by Tutorials.

---

<div class="post-metadata">

**Author:** ![mandafrederick](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mandafrederick/32/102369_2.png) [@mandafrederick](https://forums.kodeco.com/u/mandafrederick)\
**Post date:** [November 20, 2020, 7:31pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/2 "2020-11-20T19:31:00Z")

</div>

Pinned on November 20, 2020, 7:31pm UTC



---

<div class="post-metadata">

**Author:** ![rafael\_affinitycu](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rafael_affinitycu/32/103596_2.png) [@rafael\_affinitycu](https://forums.kodeco.com/u/rafael_affinitycu)\
**Post date:** [March 17, 2021, 10:19pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/3 "2021-03-17T22:19:02Z")

</div>

On Chapter 9 (More About Module), when you say “On the other hand, a `@Provider`”, don’t you mean `@Provides`?

---

<div class="post-metadata">

**Author:** ![mlasa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mlasa/32/107008_2.png) [@mlasa](https://forums.kodeco.com/u/mlasa)\
**Post date:** [September 26, 2021, 2:52am UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/4 "2021-09-26T02:52:07Z")

</div>

Section 1, Chapter 5:

In **The BusStopListPresenter implementation** , point 1:  
“You’re using _constructor_ injection to note that you’ll pass the `BusStopListViewBinder` later,…” - Should it be _field_ injection?

In **Key Points** it says:  
“…you’ve achieved a lot by applying an architectural pattern, Model View _Controller_, to the Busso App.” - Should it be Model View _Presenter_.

Cheers

---

<div class="post-metadata">

**Author:** ![lauren\_elizabeth](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/lauren_elizabeth/32/108613_2.png) [@lauren\_elizabeth](https://forums.kodeco.com/u/lauren_elizabeth)\
**Post date:** [July 13, 2022, 1:40pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/5 "2022-07-13T13:40:30Z")

</div>

feedback from member in Chapter 3:

Just wanted to mention that [https://www.raywenderlich.com/books/dagger-by-tutorials/v1.0.ea1/chapters/3-dependency-injection](https://www.raywenderlich.com/books/dagger-by-tutorials/v1.0.ea1/chapters/3-dependency-injection) repeatedly mentions AppCompactActivity where it should be AppCompatActivity

---

<div class="post-metadata">

**Author:** ![nh123](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nh123/32/102075_2.png) [@nh123](https://forums.kodeco.com/u/nh123)\
**Post date:** [July 19, 2022, 6:07am UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/6 "2022-07-19T06:07:20Z")

</div>

Found a typo on page 165: “srcDic” should be “srcDir”.

---

<div class="post-metadata">

**Author:** ![nh123](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nh123/32/102075_2.png) [@nh123](https://forums.kodeco.com/u/nh123)\
**Post date:** [July 19, 2022, 6:11am UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/7 "2022-07-19T06:11:09Z")

</div>

In chapter 6, the DaggerServerRepository starter project defines Data as `class Data`, it should probably be `data class Data(val name: String)` because `main` is later edited to call `server.receive(Data("Hello"))`.

---

<div class="post-metadata">

**Author:** ![nh123](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nh123/32/102075_2.png) [@nh123](https://forums.kodeco.com/u/nh123)\
**Post date:** [July 19, 2022, 6:56am UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/8 "2022-07-19T06:56:02Z")

</div>

- In chapter 7, one of the unit tests in NaturalSequenceGeneratorTest.kt has a typo in the method name: “test natural sequence value starting in diffenet value”.

- Page 186 says “Dagger doesn’t need to know anything about how to create the instance of `SequenceViewBinderImpl`”. Since the code in question calls the `SequenceViewBinderImpl` constructor explicitly, I don’t see how this makes sense. Maybe it should be “Dagger doesn’t need to know anything about how to create the instance of `SequenceViewBinder.Listener`”.

- The UML diagram on page 189 shows class name `BasePresenterPresenter` instead of `BasePresenter`.

- Page 195 says “[…] the app still doesn’t work! It doesn’t crash, but […]”.  
This is incorrect. The app does crash, because in the starter project, `SequencePresenterImpl.displayNextValue` is implemented as

```auto
  override fun displayNextValue() {
    sequenceViewBinder.showNextValue(sequenceModel.next())
  }

```

instead of

```auto
  override fun displayNextValue() {
    useViewBinder {
      showNextValue(sequenceModel.next())
    }
  }

```

as shown in the final project and in the book.

The `sequenceViewBinder` field is not initialised anywhere and can be removed.

- The method injection approach shown on page 199 requires changing `sequenceViewListener.onNextValuePressed()` to `sequenceViewListener?.onNextValuePressed()` in `SequenceViewBinderImpl.init`.

- Page 204 says “open the RaySequence project **from in** the starter folder”, looks like either “from” or “in” is superfluous.

- Page 210 says “you’ll get a new source tag”, that should probably be “you’ll get a new source tab”.

- Page 213 says “select the No Filter option”, should be “select the No Filters option”.

---

<div class="post-metadata">

**Author:** ![nh123](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nh123/32/102075_2.png) [@nh123](https://forums.kodeco.com/u/nh123)\
**Post date:** [August 3, 2022, 5:45am UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/10 "2022-08-03T05:45:21Z")

</div>

- Page 255 has a typo in the chapter title: “SplashViewBinde” should be “SplashViewBinder”
- Page 269: “you need to use @Inject the primary constructor” should be e.g. “you need to use @Inject on the primary constructor”
- Page 291: Should use CACHE\_SIZE instead of hard-coding 100 \* 1024L
- Page 292: typo in “provideCache” in list item 1
- Page 307: BusStopFragment.kt should be BusArrivalFragment.kt
- Page 336: Running the app shows sometimes “ClassCastException: LocationNotAvailable cannot be cast to LocationData”. This typically occurs when running in the emulator,  
and the emulator has just been started due to launching the app.
- Page 347: Says WhereIAm twice instead of WhereAmI
- Page 349: “you don’t need inject() in the Main parameter of ApplicationComponent” sounds wrong
- Page 351: The image title says WhereIAm instead of WhereAmI
- Page 353 says plugins.wether.endpoint instead of plugins.weather.endpoint
- Source code for chapter 14: Package name should be plugins.weather instead of plugins.wether
- Page 373: “The type for the key is same” should be “The type for the key is the same”

---

<div class="post-metadata">

**Author:** ![nh123](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nh123/32/102075_2.png) [@nh123](https://forums.kodeco.com/u/nh123)\
**Post date:** [August 4, 2022, 1:37pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/11 "2022-08-04T13:37:47Z")

</div>

- Page 421 says “Create a new package named ui.fragments”, this should be “Create a new package named di.fragments”
- Page 433: The first sentence “In the previous chapter […]” seems to be missing a word
- Page 437: List item 1 says ext.hilt\_version needs to be added to the starter project, but it is already there
- Page 473: The intermediate title says “VieModel” instead of “ViewModel”
- Page 518: “your continued Kotlin and saving data on Android” sounds strange

---

<div class="post-metadata">

**Author:** ![nh123](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nh123/32/102075_2.png) [@nh123](https://forums.kodeco.com/u/nh123)\
**Post date:** [August 17, 2022, 12:53pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/12 "2022-08-17T12:53:56Z")

</div>

- Page 259 says “di.injectos package”, should be “di.inject.os package”.

---

<div class="post-metadata">

**Author:** ![urieluvd](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/urieluvd/32/105896_2.png) [@urieluvd](https://forums.kodeco.com/u/urieluvd)\
**Post date:** [November 23, 2022, 2:16am UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/13 "2022-11-23T02:16:12Z")

</div>

Chapter 11: Components & Scopes, page 282

possible typo writing `proviitsdeCache()` instead of `provideCache()` in point 1.

Chapter 11: Components & Scopes, page 297

It refers to `BusStopFragment.kt` while the image and task are meant for `BusArrivalFragment`

---

<div class="post-metadata">

**Author:** ![urieluvd](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/urieluvd/32/105896_2.png) [@urieluvd](https://forums.kodeco.com/u/urieluvd)\
**Post date:** [November 23, 2022, 6:30pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/14 "2022-11-23T18:30:11Z")

</div>

Chapter 12: Components dependencies, page 316

The first image on the page is making a reference to a modification that doesn’t take place until the next step.

```auto
 fun activityComponentBuilder(): ActivityComponent.Builder 

```

The next image is still using `ActivityComponent.Factory`  
Changing it to `Builder` is the subject of the next section

 ![Dagger errata](https://files.chunter.kodeco.com/original/3X/e/3/e39eea2e49432ffee51655f5c2eee806eb3d994a.png)

---

<div class="post-metadata">

**Author:** ![nixapicem](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@nixapicem](https://forums.kodeco.com/u/nixapicem)\
**Post date:** [February 16, 2024, 9:30pm UTC](https://forums.kodeco.com/t/errata-for-dagger-by-tutorials-1st-ed/125415/15 "2024-02-16T21:30:52Z")

</div>

In Chapter 8 Page 215  
The object you get from Provider is always the same — but this isn’t because of  
Provider itself, but because of the @Singleton annotation you used on  
CycledSequencePresenter.

Instead of CycledSequencePresenter should be SequenceViewBinderImpl.
