# Errata for Jetpack Compose by Tutorials, 1st Edition

**URL:** <https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587>\
**Category:** Jetpack Compose by Tutorials\
**Created:** [February 12, 2021, 6:45pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587 "2021-02-12T18:45:12Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![jellodiil](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jellodiil/32/109742_2.png) [@jellodiil](https://forums.kodeco.com/u/jellodiil)\
**Post date:** [February 12, 2021, 6:45pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/1 "2021-02-12T18:45:12Z")

</div>

Creating this topic to catch any typos and bugs in the First Edition of Jetpack Compose by Tutorials.

---

<div class="post-metadata">

**Author:** ![jellodiil](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jellodiil/32/109742_2.png) [@jellodiil](https://forums.kodeco.com/u/jellodiil)\
**Post date:** [February 12, 2021, 6:45pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/2 "2021-02-12T18:45:35Z")

</div>



---

<div class="post-metadata">

**Author:** ![watsonyao](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/watsonyao/32/95760_2.png) [@watsonyao](https://forums.kodeco.com/u/watsonyao)\
**Post date:** [February 27, 2021, 12:16pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/3 "2021-02-27T12:16:46Z")

</div>

good tutorials.  
compose in download files may update to beta-01 ?  
and some componment in tutorials is not support any more, scrollColumn?

---

<div class="post-metadata">

**Author:** ![txintxe](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/txintxe/32/96328_2.png) [@txintxe](https://forums.kodeco.com/u/txintxe)\
**Post date:** [March 30, 2021, 8:53am UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/4 "2021-03-30T08:53:24Z")

</div>

In chapter 3.3, while explaining the Box layout in the book the function MyBox has two parameters (modifier and contentModifier) but in the code there’s only one (modifier).

---

<div class="post-metadata">

**Author:** ![androidamanda](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/androidamanda/32/102075_2.png) [@androidamanda](https://forums.kodeco.com/u/androidamanda)\
**Post date:** [April 9, 2021, 3:50pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/5 "2021-04-09T15:50:07Z")

</div>

In chapter 2, the MyRadioGroup() the RadioButton uses parameter `color` when it should be `colors`.

Also in chapter 2, the FloatingActionButton no longer has an `icon` parameter. It looks like they changed it to `content`.

---

<div class="post-metadata">

**Author:** ![timmycoder](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/timmycoder/32/93879_2.png) [@timmycoder](https://forums.kodeco.com/u/timmycoder)\
**Post date:** [August 15, 2021, 7:40pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/6 "2021-08-15T19:40:42Z")

</div>

in the chapter two, `val radioButtons = listOf(0, 1, 2)` shows an unresolved reference for `listOf()` did they change sth about this or how can i fix?

---

<div class="post-metadata">

**Author:** ![a\_rh](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/a_rh/32/101506_2.png) [@a\_rh](https://forums.kodeco.com/u/a_rh)\
**Post date:** [December 15, 2021, 1:09am UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/7 "2021-12-15T01:09:22Z")

</div>

Is there an update on this issue? I’m also having the same problem.

---

<div class="post-metadata">

**Author:** ![devopsthinh](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/devopsthinh/32/99413_2.png) [@devopsthinh](https://forums.kodeco.com/u/devopsthinh)\
**Post date:** [December 15, 2021, 9:01am UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/8 "2021-12-15T09:01:17Z")

</div>

![appdrawer.kt](https://files.chunter.kodeco.com/original/3X/1/4/14337e1dbd74b8f3914339a5a2b5664094c8e51b.png)  
🙂 In chapter 9, in part “Implementing the app drawer footer” there is a bug, because Icon doesn’t have clickable property, so need to use IconButton or another way.

---

<div class="post-metadata">

**Author:** ![nguyentruongthinh](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nguyentruongthinh/32/108544_2.png) [@nguyentruongthinh](https://forums.kodeco.com/u/nguyentruongthinh)\
**Post date:** [December 16, 2021, 2:39pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/10 "2021-12-16T14:39:48Z")

</div>

👉 For the building the app in chapter 10, I was fixed as follows (Artic Fox | 2020.3.1 patch 3):

- The AppDrawer.kt/ AppDrawerFooter():  
Replacing the last Image of that function by:  
IconButton(  
onClick = { changeTheme() },  
modifier = modifier  
.constrainAs(darkModeButton) {  
end.linkTo(parent.end)  
centerVerticallyTo(settingsImage)  
}) {  
Icon(  
imageVector = ImageVector.vectorResource(id = R.drawable.ic\_moon),  
contentDescription = stringResource(id = R.string.change\_theme),  
tint = colors.primaryVariant  
)

- The build.gradle (project):  
//Top-level build file where you can add configuration options common to all sub-projects/modules.  
buildscript {  
ext.kotlin\_version = “1.6.0”  
ext.compose\_version = ‘1.1.0-rc01’  
ext.compose\_ui\_version = ‘1.4.0’

allprojects {  
repositories {  
google()  
jcenter()  
}  
}

task clean(type: Delete) {  
delete rootProject.buildDir  
}

- The build.gradle (app):  
plugins {  
id ‘com.android.application’  
id ‘kotlin-android’  
id ‘kotlin-kapt’  
}

android {  
compileSdkVersion 31  
buildToolsVersion “30.0.2”

defaultConfig {  
applicationId “com.raywenderlich.android.jetnotes”

```
minSdkVersion 26
targetSdkVersion 31

versionCode 1
versionName "1.0"

vectorDrawables.useSupportLibrary = true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

```

}

buildTypes {  
release {  
minifyEnabled false  
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’  
}  
}

compileOptions {  
sourceCompatibility JavaVersion.VERSION\_1\_8  
targetCompatibility JavaVersion.VERSION\_1\_8  
}

kotlinOptions {  
jvmTarget = ‘1.8’  
allWarningsAsErrors = false  
}

buildFeatures {  
compose true  
}

composeOptions {  
kotlinCompilerVersion kotlin\_version  
kotlinCompilerExtensionVersion compose\_version  
}  
}

dependencies {

// Kotlin  
implementation “org.jetbrains.kotlin:kotlin-stdlib:$kotlin\_version”

// Default  
implementation “androidx.core:core-ktx:1.7.0”  
implementation “androidx.appcompat:appcompat:1.4.0”  
implementation “androidx.constraintlayout:constraintlayout:2.1.2”  
implementation “androidx.activity:activity-ktx:1.4.0”  
implementation “androidx.activity:activity-compose:$compose\_ui\_version”

// Material  
implementation “com.google.android.material:material:1.4.0”

// Compose  
implementation “androidx.compose.runtime:runtime:$compose\_version”  
implementation “androidx.compose.runtime:runtime-livedata:$compose\_version”  
implementation “androidx.compose.ui:ui:$compose\_version”  
implementation “androidx.compose.foundation:foundation-layout:$compose\_version”  
implementation “androidx.compose.material:material:$compose\_version”  
implementation “androidx.compose.material:material-icons-extended:$compose\_version”  
implementation “androidx.compose.foundation:foundation:$compose\_version”  
implementation “androidx.compose.animation:animation:$compose\_version”  
implementation “androidx.compose.ui:ui-tooling:$compose\_version”  
implementation “androidx.constraintlayout:constraintlayout-compose:1.0.0-rc02”

// Room  
implementation “androidx.room:room-runtime:2.3.0”  
kapt “androidx.room:room-compiler:2.3.0”

// Coroutines  
implementation “org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0”  
implementation “androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0”  
}  
And the AndroidManifest.xml:  
 ![Chapter10_3](https://files.chunter.kodeco.com/original/3X/8/8/88bb81df718a189e413a59c0741d682dbe675a31.png)

---

<div class="post-metadata">

**Author:** ![nguyentruongthinh](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nguyentruongthinh/32/108544_2.png) [@nguyentruongthinh](https://forums.kodeco.com/u/nguyentruongthinh)\
**Post date:** [December 25, 2021, 9:41am UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/11 "2021-12-25T09:41:35Z")

</div>

😆 I have been completed this book’s guidelines. Thanks to Reywenderlich’s team! 😘  
 ![feedback_comple](https://files.chunter.kodeco.com/original/3X/6/8/6801c93879dbfd90a6cd66e24cda693bb24f70bc.png)

---

<div class="post-metadata">

**Author:** ![fannydemey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fannydemey/32/102075_2.png) [@fannydemey](https://forums.kodeco.com/u/fannydemey)\
**Post date:** [February 9, 2022, 8:28pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/12 "2022-02-09T20:28:46Z")

</div>

Hi !  
Sample codes in this books have very bad practice for accessibility (sometimes contentDescription brings no valuable information, some other times contentDescription mention redundant information like “buttons” and sometimes also image/icon should be ignored. It could be nice to improve those issue in your next version of this book. Also could be nice to add a chapter on accessibility. Semantics are easy to use and it’s a shame to not mentioned it !

---

<div class="post-metadata">

**Author:** ![maku](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/maku/32/81494_2.png) [@maku](https://forums.kodeco.com/u/maku)\
**Post date:** [April 26, 2022, 3:53pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/13 "2022-04-26T15:53:55Z")

</div>

Grammatical glitch, page 305  
Jetpack Compose offers a list of events that can trigger at specific points in the the

Two the’s in that statement.

---

<div class="post-metadata">

**Author:** ![timacosta06](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/timacosta06/32/102075_2.png) [@timacosta06](https://forums.kodeco.com/u/timacosta06)\
**Post date:** [June 3, 2022, 2:25pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/14 "2022-06-03T14:25:21Z")

</div>

Took me a while to figure out that to build an OutlinedTextField, the proposed parameters are non existing anymore, specifically activeColor. Instead of this:

```auto
OutlinedTextField(
    label = { Text(text = stringResource(id = R.string.email)) },
    activeColor = colorResource(id = R.color.colorPrimary),
    keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Email),
    value = textValue.value,
    onValueChange = {
      textValue.value = it
    },
  )

```

it is this

```auto
OutlinedTextField(
            value = textValue.value,
            onValueChange = {
                textValue.value = it
            },
            label = { Text(text = stringResource(id = R.string.email)) },
            colors = TextFieldDefaults.outlinedTextFieldColors(
                focusedBorderColor = colorResource(id = R.color.colorPrimary)
            ),
            keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Email),
        )

```

notice colors instead of activeColor.  
Of course it is hard to keep up to date with all the changes but this forces you to search and “waste” time outside when the idea is to basically follow through the course using more concise material.

---

<div class="post-metadata">

**Author:** ![fernandospr](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fernandospr/32/110226_2.png) [@fernandospr](https://forums.kodeco.com/u/fernandospr)\
**Post date:** [July 31, 2022, 7:01pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/15 "2022-07-31T19:01:59Z")

</div>

**Errata for Chapter 2**

- Please reformat the code to use two space indentation for all the source code in the chapter. Actually, I’ve seen in several chapters of the book that you’re using four space indentation, also two and three space indentation. I believe you should stick to one code style.

- `TexField` should be `TextField` (missing t).

- “_Note that it’s of type TextFieldValue and not String._” → Actually it’s a String.

- “_The callback provides a new TextFieldValue so you can update the displayed text._” → It should be String instead of TextFieldValue.

- “_Open ProgressIndicatorScreen.kt_” → should be ProgressIndicatorsScreen.kt (with s) or you should rename the file.

- The README.md file has a 2020 license, but it should be 2021 as the rest of the code.

---

<div class="post-metadata">

**Author:** ![fernandospr](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fernandospr/32/110226_2.png) [@fernandospr](https://forums.kodeco.com/u/fernandospr)\
**Post date:** [August 14, 2022, 1:00pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/16 "2022-08-14T13:00:40Z")

</div>

**Errata for Chapter 3**

- "Start by replacing `MyRow() `" → should be `MyRow()`.

- The README.md file has a 2020 license, but it should be 2021 as the rest of the code. I think this may apply to all the chapters.

**Errata for Chapter 4**

- Book Categories image → The violet group should be CATEGORY3.

- ListScreen.kt of the starter project should use two space indentantion.

- TextScreen.kt of the starter and final projects should use two space indentantion.

- Review space indentantion for the book code, e.g. LazyListScope uses four space indentation.

**Errata for Chapter 5**

- Projects don’t have README.md, but previous projects had one. You’d like to unify criteria.

- RepositoryImpl in starter/final projects should use isEmpty instead of isNullOrEmpty.

- In RepositoryImpl why are you using GlobalScope.launch? You’re not using coroutines. Did you forget to use suspend keyword on dao functions?

**Errata for Chapter 7**

- onCreateNoteClick() should be onCreateNewNoteClick()

**Errata for Chapter 8**

- Section “Adding support for the Back button”, where it states “Currently, when you open the Save Note screen and press the Back button, the app closes.”. First, I thought you were talking about the button of the top bar, where it does work as expected, pressing it goes to the Notes screen. Then I realized that you were talking about the device’s back button. Maybe you’d like to clarify that better :]  
Also, after adding the BackHandler, pressing the device’s back button does close the bottom drawer, but pressing the top bar back button does not. Maybe you’d like to unify that behavior.

- Section “Theming in Compose”, Theme.kt code doesn’t match article starter code.  
`secondary = rwGreen` vs `secondary = rwRed`.

- Section “Key points”, you mention `OnBackPressedDispatcherOwner` and `Ambient` which is not mentioned in the chapter before. Did you mean `BackHandler`?

---

<div class="post-metadata">

**Author:** ![timacostarindus](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/timacostarindus/32/102075_2.png) [@timacostarindus](https://forums.kodeco.com/u/timacostarindus)\
**Post date:** [November 6, 2022, 2:24pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/18 "2022-11-06T14:24:24Z")

</div>

Chapter 4 - ScrollableColumn / Row - the book describes the usage of these composable functions but as per [Google Issue Tracker](https://issuetracker.google.com/issues/170468083?pli=1)

ScrollableColumn/Row were deprecated. Using ScrollableColumn is less efficient comparing to LazyColumn when you have a large scrolling content because with LazyColumn we can only compose/measure/draw visible elements. To prevent users from going inefficient way we decided to deprecate ScrollableColumn and ScrollableRow and promote usages of LazyColumn and LazyRow instead. Users can still decide they don’t need the lazy behaviour and use the modifiers directly like this: Column(Modifier.verticalScroll(rememberScrollState()))

---

<div class="post-metadata">

**Author:** ![victorfarkas](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/victorfarkas/32/105896_2.png) [@victorfarkas](https://forums.kodeco.com/u/victorfarkas)\
**Post date:** [December 8, 2022, 4:33pm UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/19 "2022-12-08T16:33:59Z")

</div>

What is the correct Code for Point 3 and 4 ???

---

<div class="post-metadata">

**Author:** ![jellodiil](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jellodiil/32/109742_2.png) [@jellodiil](https://forums.kodeco.com/u/jellodiil)\
**Post date:** [March 29, 2023, 12:13am UTC](https://forums.kodeco.com/t/errata-for-jetpack-compose-by-tutorials-1st-edition/132587/20 "2023-03-29T00:13:25Z")

</div>


