4th Edition Errata

Hello! This post will contain the errata that is found in the 4th edition of the Android Programming Guide.

Is this where we flag issues? Or just for “vetted” errata (that are reported in some other manner)?

On page #28, false.setOnClickListener { view: View ->`

should be:
falseButton.setOnClickListener { view: View ->

I have the ebook it shows page 65 or 66
But it does look like a typo because a couple pages before pg 62 it is falseButton

1 Like

I’d forgotten there’s an ebook version and page numbers would be different - thanks for reminder :slight_smile:

1 Like

It helps to use the listing numbers instead. This is in reference to Listing 1.11.

1 Like

The title for Figure 22.8 says BeastBox instead of BeatBox.

I found some errata.

Chapter 6 (page: 126, printing version)

answerIsTrue = intent.getBooleanExtra(EXTRA_ANSWER_IS_TRUE, false)
-> answerIsTrue = getIntent().getBooleanExtra(EXTRA_ANSWER_IS_TRUE, false)

Chapter 6 (page: 127, printing version)

In MainActivity, modify cheatButton’s listener to call startActivityForResult(Intent, int).
-> startActivityForResult(Intent, Int).

Thank you for your nice book!

Hey there! Thanks for the keen eye.

The first one you mentioned is actually a feature of the new Kotlin APIs on Android. intent is now a property on the Activity class so it can be used instead of getIntent().

The int used in the startActivityForResult() code should definitely be Int though. Thanks for reporting it and I’m really happy to hear that you like the book!



Errata: page 196 (Printing version)

Before you dive in to ConstraintLayout, you must do a little legwork and learn a little background.
You will need a copy of that fancy handcuff image from Figure 10.1 in your project. Open
the solutions file (www.bignerdranch.com/solutions/AndroidProgramming4e.zip) and the
09_LayoutsAndWidgets/CriminalIntent/app/src/main/res directory. Copy each density version of
ic_solved.png into the appropriate drawable folder in your project.

09_LayoutsAndWidgets -> 10_LayoutsAndWidgets

Thank you for your nice book.

Errata: page 237(Printing version), Listing 11.17 in the chapter 11
private val crimeRepository = CrimeRepository.get()
-> private val crimeRepository = CrimeRepository.getCrimes()

Errata: page 165(Printing version), chapter 8

Moving on to the CheckBox, get a reference to it in onCreateView(…). Then, set a listener in onStart()
that will update the solvedCheckBox field of the Crime, as shown in Listing 8.10. Even though the
OnClickListener is not triggered by the state restoration of the fragment, putting it in onStart helps
keep all of your listeners in one place and easy to find.
Listing 8.10 Listening for CheckBox changes (CrimeFragment.kt)

solvedCheckBox field -> isSolved property

Listing 24.12

val flickrHomePageRequest : Call<String> = bnrInterface.fetchContents()

should be

val flickrHomePageRequest: Call<String> = flickrApi.fetchContents()

to match Listing 24.11

I cannot find the http://www.bignerdranch.com/solutions/AndroidProgramming4e.zip resource. It keeps giving me 404 error and I need the database from here.

So do I. When I try to open this link, it always says 404.