Errata

Learning Android

Errata for Learning Android

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
PDF Page 16
Paragraph under Setting up a PATH to Tools

The skd in ~/android-skd/platform-tools should be changed to ~/android-sdk/platform-tools

Rakesh Karanth  Apr 07, 2015 
PDF Page 65
Figure 5-1. Activity life cycle

When switching from stopped to running state onCreate method will no be executed! This method will be executed only once.

andrey  Feb 12, 2015 
PDF Page 66
Paused state / Stopped state

It says: "The Activity Manager calls onPause() when putting
your application into the paused state, but we don’t use that hook to perform any activities
in this book" and then
"The Activity Manager calls onStop() when putting your application
into this state, so it is wise in this method to do anything you need in order to
save the state of your app, such as writing data to disk or a database"

ITS strictly vice versa! Android can kill activity and onStop method can never be called so in all google docs its directly says that you should save state in onPause since it can be the last methods in your app life cycle.

andrey  Feb 12, 2015 
PDF Page 104
2nd paragraph in the section titled "The StatusActivity Java Class"

"The class is part of the com.marakana.android.yamba Java package, and as such is part of that directory."

I believe the package name is just com.marakana.yamba instead of com.marakana.android.yamba.

Anonymous  Mar 24, 2015 
Printed Page 104
2nd paragraph in "The StatusActivity java Class" section

The package is listed as com.marakana.android.yamba, but probably should be com.marakana.yamba instead, in order to match what is entered for the Package Name in Figure 7-6 (pg. 93) and is shown in the Package Explorer in Figure 7-9 (pg. 97).

Philip Freihofner  Jun 03, 2015 
Printed Page 116-118
code

The code on pages 116-118, when copied exactly and run, returns the error:
Couldn't load memtrack module (No such file or directory) and won't install.

Rachel Drummond  Oct 22, 2014 
Printed Page 138
2nd-to-last paragraph

The line with reads: "We no longer need res/layout/activity_status.xml" should read "We no longer need res/layout/new_activity_status.xml".

Philip Freihofner  Jun 12, 2015 
PDF Page 146
Example 9.3

The SettingsFragment class is missing "implements OnSharedPreferenceChangeListener", and the code fails to compile without it.

kelskye  Nov 18, 2015 
PDF, ePub Page 152
United States

In Example 9-3, the class definition for SettingsFragment needs to implement OnSharedPreferenceChangeListener. The definition should read:

public class SettingsFragment extends PreferenceFragment implements
OnSharedPreferenceChangeListener {

The implements clause is missing.

John Vogtle  Nov 30, 2014