Errata

Head First Android Development

Errata for Head First Android Development

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page Create the ResultViewModelFactory class on p 472
Code for the override of the create method

override fun <T: ViewModel?> create(modelClass: Class<T>): T {
gave error, "'create' overrides nothing".

Removed the nullable symbol on ViewModel, ie,
override fun <T: ViewModel> create(modelClass: Class<T>): T {
and that cleared the error and the app executed as expected.

Lawrence Wolfson  Jul 23, 2022 
Chapter 2
https://learning.oreilly.com/api/v2/epubs/urn:orm:book:9781492076513/files/assets/f0071-02.png

In the section "How to get the spinner’s value" it says that you must convert the selectedItem to a string e.g.

val color = beerColor.selectedItem.toString()

However, in the section "The updated code for MainActivity.kt" it does not show the .toString()

val color = beerColor.selectedItem

Terry Tyson  Jan 17, 2023 
PDF Page Book page 85
Example code on the page

Currently, the code for this title no longer works properly with Android Studio Giraffe, Version 2022.3.1, as the code constantly failed to load properly with several sections not showing where they should as reported in the title.

Henry Fidler  Sep 05, 2023