Missing = in listing 2.6

The newly added text in Listing 2.6 should have = before ‘true’.

Good catch. With Android Studio Giraffe (or maybe Hedgehog), Android Studio now creates Gradle build files using the Kotlin syntax instead of the old Groovy syntax. They look very similar, but there may be small differences.

Ah, so you’re saying it works in older versions (Flamingo for instance)? I’m using Giraffe, whatever version was top of the list a few days ago.

In another post, I suggested having some sort of unified location for confirmed code corrections (either because the book has a typo, or because of a reverse-compatibility fail on Android’s part).

After I made this update: “viewBinding = true” my project threw some dependency error.

I found this solution on stackoverflow: add to the build.gradle file the following:

implementation (“com.android.databinding:viewbinding:4.0.1”)