You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
In which task and step of the codelab can this issue be found?
In the code
Describe the problem
The code us missing the () after the setOnClickListener
Instead of putting the (), the text just goes straight to {} which does not compile because we have to define the setOnLickListener as a function
Steps to reproduce?
Go to...
Click on...
See error...
Versions Android Studio version: API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered:
@QatarCoin
Thank you so much for reporting this issue. This is fixed and will be published soon.
Added some more explanation to make it easier to understand.
Use the rollButton object and set a click listener on it by calling the setOnClickListener() method. Instead of the parentheses following the method name, you will actually be using curly braces following the method name. This is a special syntax for declaring a Lambda, which you'll learn more about in a future codelab.
What you need to know for now is that within the curly braces, you put instructions for what should happen when the button is tapped. You'll have your app display a Toast, which is a brief message in the next step.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-create-dice-roller-app-with-button?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-four%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-create-dice-roller-app-with-button#4
In which task and step of the codelab can this issue be found?
In the code
Describe the problem
The code us missing the () after the setOnClickListener
Instead of putting the (), the text just goes straight to {} which does not compile because we have to define the setOnLickListener as a function
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered: