Use Basic Compose Building Blocks |

Learn all about Rows, Columns, Text, Button and Icon elements, and how to use said building blocks in Jetpack Compose.

This is a companion discussion topic for the original entry at
1 Like

Hi, maybe for everyone who try to build this project with newer libraries than alpha compose …
if you have a error ```
Cannot access ‘setContent’:

that is because the project need implementation "androidx.activity:activity-compose:1.3.0"
and setContent is from androidx.activity.compose.setContent

Author of this tutorial is a little bit cheater?
compose = “1.0.0-alpha08”
is in materials = and in this version Icon does not have contentDescription :man_shrugging:t3:.
A little bit confuse :cry:

Hey @yogaboy!

The materials repo on GH wasn’t pointing to the correct branch unfortunately. It was pointing to 1.1, instead of 2.0.

The 2.0 branch should be using a newer (beta) version, which was the latest at the time of creation, which should be able to follow these videos more closely.

I’m sorry for the confusion - I wrapped up the 2.0 version of the course right before moving to another company and I didn’t have much control over the publishing process after that.


HI Filip,
thanks a lot for your answer. But where can I find the branch 2.0? I tried to download branch 2.0 but is empty.
Oh I see. Android studio can not download branch 2.0 in this project structure. At first I have to download whole project 2.0 from github and after that open branch dedicated to the chapter.

Unfortunately, the project still wants a lot of work to compile at all.

But it’s much better with the process of calling registerForActivityResult(AddBookContract()) { isBookCreated → …}
I didn’t find it anywhere that it is private val addBookContract by lazy {). Cool.
Thanks Filip!