Coder Social home page Coder Social logo

android-basics-kotlin-cupcake-app's Introduction

Cupcake app

This app contains an order flow for cupcakes with options for quantity, flavor, and pickup date. The order details get displayed on an order summary screen and can be shared to another app to send the order.

This app demonstrates multiple fragments in an activity, a shared ViewModel across fragments, data binding, LiveData, and the Jetpack Navigation component.

Pre-requisites

  • Familiar with activities and fragments
  • How to use styles and themes in the UI
  • Basic understanding of Jetpack architecture components including ViewModel and LiveData
  • Data binding and binding expressions
  • Kotlin syntax basics

Getting Started

  1. Install Android Studio, if you don't already have it.
  2. Download the sample.
  3. Import the sample into Android Studio.
  4. Build and run the sample.

android-basics-kotlin-cupcake-app's People

Contributors

jkcoolmom avatar kkuan2011 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-basics-kotlin-cupcake-app's Issues

Android Basics: Navigation backstack, typo on strings variable name

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#4

In which task and step of the codelab can this issue be found?
5. Send the order

Describe the problem
The wrong variable name is used in the following example code in the page:

In your Kotlin code, calling:
getQuantityString(R.string.cupcakes, 1, 1) returns the string 1 cupcake
getQuantityString(R.string.cupcakes, 6, 6) returns the string 6 cupcakes
getQuantityString(R.string.cupcakes, 0, 0) returns the string 0 cupcakes

R.string.cupcakes should actually be R.plurals.cupcakes

Steps to reproduce?
Error in Tutorial text, not in the actual code.

Versions
Not relevant.

Additional information
Not relevant.

Android Kotlin Basics: Test ViewModels and LiveData

URL of codelab
https://developer.android.com/codelabs/android-basics-kotlin-test-viewmodel-and-livedata?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fandroid-basics-kotlin-test-viewmodel-and-livedata#5

In which task and step of the codelab can this issue be found?
3

Describe the problem

The 3rd step tells to make a price check test and add this code :

  • "assertEquals("$27.00", viewModel.price.value)"

Knowing that the transformation happening in OrderViewModel will format to the current locale currency info, which for me is BR info, i fixed so it would fit my nationality, then i tried :

  • "assertEquals("R$27.00", viewModel.price.value)"
  • "assertEquals("R$ 27.00", viewModel.price.value)"
  • "assertEquals("R$27,00", viewModel.price.value)"
  • "assertEquals("R$ 27,00", viewModel.price.value)"

Then i got the error on the images attached.

Steps to reproduce?

  1. Go to... src>androidTest>ViewModelTests
  2. Click on... Run "price_twelve_cupcake()"
  3. See error...
    expected:<R$[ ]27,00> but was:<R$[ ]27,00>
    Expected :R$ 27,00
    Actual :R$ 27,00

org.junit.ComparisonFailure: expected:<R$[ ]27,00> but was:<R$[ ]27,00>

Versions
Android Studio version:

Android Studio Bumblebee | 2021.1.1
Build #AI-211.7628.21.2111.8092744, built on January 19, 2022
Runtime version: 11.0.11+9-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 4
Registry: external.system.auto.import.disabled=true, debugger.watches.in.variables=false
Non-Bundled Plugins: org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40), org.intellij.featureSuggester (211.205), org.intellij.plugins.markdown (211.7142.37)

API version of the emulator:

Android version : 11.0(R) - API 30
Emulator Version : 31.2.6-8100890

Additional information
Include screenshots if they would be useful in clarifying the problem.

This is my Test code:

image

This is the error notification:

image

Here is the error description:

image

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#3

In which task and step of the codelab can this issue be found?
step 9

Describe the problem
in the codelab, the sentence,
"That means the class, properties, or methods or not being used at the moment, but they will be! "
should be
"That means the class, properties, or methods are not being used at the moment, but they will be! "

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?authuser=5&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fauthuser%3D5%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#2

In which task and step of the codelab can this issue be found?
3. Implement Up button behavior

Describe the problem
after I added the following code in the MainActivity class:

41 override fun onSupportNavigateUp(): Boolean {
42 return navController.navigateUp() || super.onSupportNavigateUp()
43 }

When I click the back arrow on the actionbar on top of the app, the app crashes.

Logcat window:

2021-04-13 13:39:14.168 12770-12770/com.example.cupcake E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.cupcake, PID: 12770
kotlin.UninitializedPropertyAccessException: lateinit property navController has not been initialized
at com.example.cupcake.MainActivity.onSupportNavigateUp(MainActivity.kt:42)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:235)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.widget.ToolbarWidgetWrapper$1.onClick(ToolbarWidgetWrapper.java:188)
at android.view.View.performClick(View.java:7448)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28305)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
2021-04-13 13:39:14.269 12770-12770/com.example.cupcake I/Process: Sending signal. PID: 12770 SIG: 9

Versions
Android Studio version: 4.1.3
API version of the emulator: Pixel4 API 30

Additional information
Include screenshots if they would be useful in clarifying the problem.
image

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#3

In which task and step of the codelab can this issue be found?
4./ Learn about tasks and back stack problem

Additional information
Include screenshots if they would be useful in clarifying the problem.
Text_Error

**Using Google Chrome

Radio Button Text Not Updating via DataBinding

https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?authuser=1&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fauthuser%3D1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#9

Shared ViewModels Across Fragments: Step 7

Describe the problem

The text on the PickupFragment radio buttons are blank and won't fill in despite using the databinding commands in XML (I copy pasted from the codelab). The FlavorFragment XML databinding (basically doing the exact same thing) works fine so I'm not sure what's going on.

I made sure the text wasn't white (hah) and I can set the android:text attribute with a hardcoded String and it shows up fine.

I also checked my current code against the solution code and everything seems fine, nothing out of place. Any ideas?

Android Basics: Shared ViewModel

URL of codelab

https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found?

Step 3

Describe the problem

In FlavorFragment.kt, inside the goToNextScreen() method, replace the code displaying the toast to navigate to the pickup fragment. Use the action ID, R.id.action_flavorFragment_to_pickupFragmen and make sure this ID matches the action declared in your nav_graph.xml.

R.id.action_flavorFragment_to_pickupFragmen needs a trailing 't'. Should be R.id.action_flavorFragment_to_pickupFragment.

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#1

In which task and step of the codelab can this issue be found?
Steo 2

Describe the problem
In code example instead of

setContentView(R.layout.main_activity)

it should be
setContentView(R.layout.activity_main)

Steps to reproduce?

  1. Go to codelab
  2. Click on Step 2
  3. See typo error in code

Additional information
Στιγμιότυπο από 2021-08-16 09-11-21

Android Basics: Navigation backstack

URL of codelab

https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#2
In which task and step of the codelab can this issue be found?
3. Implement Up button behavior

Describe the problem
Click the back/up button the application quits/exits stops.

Steps to reproduce?

  1. Go to... any fragment other than the start fragment
  2. Click on... the back arrow or up arrow in the action bar.
  3. See error...
    kotlin.UninitializedPropertyAccessException: lateinit property navController has not been initialized
    at com.example.cupcake.MainActivity.onSupportNavigateUp(MainActivity.kt:52)
    Versions
    Android Studio version: 2020.3.1 Patch 2
    API version of the emulator: 30.9.5-7820599

Additional information
Include screenshots if they would be useful in clarifying the problem.
package com.example.cupcake

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupActionBarWithNavController

/**

  • Activity for cupcake order flow.
    */
    class MainActivity : AppCompatActivity(R.layout.activity_main) {

    // Make navController a class variable so you can use it in another method.

    private lateinit var navController: NavController

    // override the onCreate() method to set up the navigation controller. Get an instance of
    // NavController from the NavHostFragment.
    // Make a call to setupActionBarWithNavController(navController) passing in the instance of
    // NavController. This will do the following: Show a title in the app bar based off of the
    // destination's label, and display the Up button whenever you're not on a top-level
    // destination.

    override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

     val navHostFragment = supportFragmentManager
         .findFragmentById(R.id.nav_host_fragment) as NavHostFragment
     val navController = navHostFragment.navController
    
     setupActionBarWithNavController(navController)
    

    }

    override fun onSupportNavigateUp(): Boolean {
    return navController.navigateUp() || super.onSupportNavigateUp()
    }

}

Test ViewModels and LiveData - Fail to perform tests with fail in InstantTaskExecutorRule

[URL of codelab

In which task and step of the codelab can this issue be found?
page#5 AND solution code

Describe the problem
tests fail to accomplish even when I use the solution code.
For some reason it fails in InstantTaskExecutorRule part. When checking documentation, it says it is deprecated. I am not sure whether it is related to update in Android Studio that makes it fail.

> Task :app:compileDebugAndroidTestKotlin FAILED
e: D:\Downloads\Android Studio Projects\android-basics-kotlin-cupcake-app-starter\android-basics-kotlin-cupcake-app-starter\app\src\androidTest\java\com\example\cupcake\model\ViewModelTests.kt: (3, 36): Unresolved reference: testing
e: D:\Downloads\Android Studio Projects\android-basics-kotlin-cupcake-app-starter\android-basics-kotlin-cupcake-app-starter\app\src\androidTest\java\com\example\cupcake\model\ViewModelTests.kt: (15, 35): Unresolved reference: InstantTaskExecutorRule

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugAndroidTestKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 25s
54 actionable tasks: 7 executed, 47 up-to-date

Steps to reproduce?
Follow the steps of CodeLab

Versions
Android Studio version: 2021.1.1. Patch 2
API version of the emulator: API32

Additional information
Include screenshots if they would be useful in clarifying the problem.
image

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack

In which task and step of the codelab can this issue be found?
5. Send the order

Describe the problem
In the code for the full sendOrder() method, the last argument for getString() that will be placed in the orderSummary variable is sharedViewModel.priceString.value.toString(), however this should be sharedViewModel.price.value.toString().

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.
wrong_variable_name

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#2

In which task and step of the codelab can this issue be found?
Implement up button behavior.

Describe the problem
When including the code from the codelab and running the app crashes and closes out the app.

Steps to reproduce?

  1. Open the app.
  2. Select the amount of cupcakes.
  3. Click on the Up button to go back.

Versions
Android Studio version: 4.2.2
API version of the emulator: 29

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Navigation backstack

https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#4

In 2nd Step, sendOrder()?

sharedViewModel.price.value.toString() is always null

Steps to reproduce?

  1. Go to Summary Screen
  2. Click on "SEND ORDER TO ANOTHER APP"
  3. Total value is always null in the description within other apps

Versions
Android Studio version: Android Studio Arctic Fox | 2020.3.1 Patch 3
API version of the emulator: 30.9.5-7820599

Additional information
Transformation methods for LiveData.
These methods permit functional composition and delegation of LiveData instances. The transformations are calculated lazily, and will run only when the returned LiveData is observed. Lifecycle behavior is propagated from the input source LiveData to the returned one.

sharedViewModel.price.value.toString() is always null. Since it uses Transformation method, it needs to be observed

image

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#6

In which task and step of the codelab can this issue be found?
Shared ViewModel Across Fragments Task 7 step 8.

Describe the problem
The step says to:
Remove the initial values from the declaration of the properties in the class. Now you are using the init block to initialize the properties when an instance of OrderViewModel is created.

Which results in several errors: Unresolved reference, and Variable Expected

Steps to reproduce?

  1. Go to follow the steps of the tutorial and you get those errors
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?authuser=4&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fauthuser%3D4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#2

In which task and step of the codelab can this issue be found?
Step 3.2

Describe the problem
override fun onSupportNavigateUp(): Boolean {
return navController.navigateUp() || super.onSupportNavigateUp()
}`
navController unresolved reference

Steps to reproduce?
1.Load: https://github.com/google-developer-training/android-basics-kotlin-cupcake-app/tree/viewmodel
2.Import to Android Studio
3.Write the code according to step 3.2

Versions
Android Studio version: 4.2.2
API version of the emulator: 19

Additional information
Include screenshots if they would be useful in clarifying the problem.
image

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?authuser=1&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fauthuser%3D1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found?
Task: 3
Step: "Update title in app bar"
Sub-step: 4

Describe the problem
The text "Open navigataion/nav_graph.xml" should read "Open navigation/nav_graph.xml"

Additional information
Include screenshots if they would be useful in clarifying the problem.
Screenshot 2021-04-19 092202

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#2

In which task and step of the codelab can this issue be found

In the MainActivity Class, after adding the following:

(i) the "private lateinit var navController: NavController"

and (ii) adding the following function:
override fun onSupportNavigateUp(): Boolean {
return navController.navigateUp() || super.onSupportNavigateUp()
}

Describe the problem

Upon running the app, when the "up" button is clicked, the "Cupcake keep stopping".

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version: 4.2.2
API version of the emulator: Pixel 3a AP! 28

Additional information
Include screenshots if they would be useful in clarifying the problem.

Shared ViewModel Across Fragments - cupcake-app

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#9

In which task and step of the codelab can this issue be found?
https://github.com/google-developer-training/android-basics-kotlin-cupcake-app/tree/viewmodel

Describe the problem

When try sync gradle, appear this warning message in Sync:

This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 2020.3.1 or newer.

Then, I tried to run "with info", appeared this in Build output:
"The specified Gradle distribution 'https://services.gradle.org/distributions/gradle-7.0.2-all.zi' does not exist."

Thanks

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Navigation backstack - instructions formatting error

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack

In which task and step of the codelab can this issue be found?
"4. Learn about tasks and back stack"

Describe the problem
There are 3 consecutive headings (I suspect the latter 2 should be list items):

Modify the back stack in the Cupcake app

Modify the FlavorFragment, PickupFragment, and SummaryFragment classes and layout files in order to offer a Cancel order button to the user.

Add navigation action

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel

In which task and step of the codelab can this issue be found?
Step 2: Starter code walkthrough

Describe the problem
In the section describing the AppCompatActivity, the definitions change from
-AppCompatActivity(R.layout.activity_main) to
-setContentView(R.layout.main_activity)
The resource id name changes and might confuse new users

Steps to reproduce?

  1. Go to codelab referenced above
  2. Go to Step 2
  3. Notice the error under the starter code walkthrough section

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?hl=es&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fhl%3Des%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#4

In which task and step of the codelab can this issue be found?
5. Send the order

    1. The full sendOrder() method should look like the following:

Describe the problem

this line of code -> sharedViewModel.priceString.value.toString()
should be -> sharedViewModel.price.value.toString()

Steps to reproduce?

  1. Go to... https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?hl=es&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fhl%3Des%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#4

  2. Click on...
    fun sendOrder() {
    val numberOfCupcakes = sharedViewModel.quantity.value ?: 0
    val orderSummary = getString(
    R.string.order_details,
    resources.getQuantityString(R.plurals.cupcakes, numberOfCupcakes, numberOfCupcakes),
    sharedViewModel.flavor.value.toString(),
    sharedViewModel.date.value.toString(),
    sharedViewModel.priceString.value.toString()
    )

    val intent = Intent(Intent.ACTION_SEND)
    .setType("text/plain")
    .putExtra(Intent.EXTRA_SUBJECT, getString(R.string.new_cupcake_order))
    .putExtra(Intent.EXTRA_TEXT, orderSummary)

    if (activity?.packageManager?.resolveActivity(intent, 0) != null) {
    startActivity(intent)
    }
    }

  3. See error...
    line -> sharedViewModel.priceString.value.toString()

Versions
Android Studio version: 4.1.2
API version of the emulator: no

Additional information my first report
Include screenshots if they would be useful in clarifying the problem.
https://gyazo.com/47ebe67bf9b7030467962c176b8c3335

Android Basics: Shared ViewModel - Proyect version is the finished product

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel

In which task and step of the codelab can this issue be found?
Starter app overview, step 2 - Get the code

Describe the problem

When you download the code, you automatically download the main branch, which is the complete version of the app and it can't be used to learn the unit since it is already complete and has all of the missing pieces. You can set the correct branch in git but someone who's not used to using git(or doesn't know about version control) will not be able to use the code to learn by doing.

Steps to reproduce?

  1. Go to the link to the Github on the codelab
  2. Click on download to zip
  3. Open the project and see it is the complete version

Versions
_Android Studio version: Not relevant
_API version of the emulator: Not relevant

Additional information
It can easily be changed by just doing a checkout to the correct branch but it might be useful to explain that on the codelab

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found?
-Shared ViewModel Across Model

Describe the problem
I am not able to change the title of the app bar
Screenshot 2021-06-25 at 11 54 27 AM

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version: 4.2.1
API version of the emulator: 30_x86

Additional information
Include screenshots if they would be useful in clarifying the problem.

Cancel Button, onClick?

https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?authuser=1&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fauthuser%3D1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#3

Task 3.4
add onClick on the XML.

**I am try add on click in my cancel button but I when I write where is the fun, doesn't find the class? **

This is my button code

<Button
android:id="@+id/cancel_button"
style="?attr/materialButtonOutlinedStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/side_margin"
android:onClick="@{() -> flavorFragment.cancelOrder()}"
android:text="@string/cancel"
app:layout_constraintEnd_toStartOf="@id/next_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/next_button"

android:onClick="@{() -> flavorFragment.cancelOrder()}" flavorFragment has a red line , Ive checked , my fragment name is correct, in my nav_graph.xml is correct.
I dont know where is the issue

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found?
Add Navigation to the flavor and pickup fragments

Describe the problem
In the sentece, "Use the action ID, R.id.action_flavorFragment_to_pickupFragmen and make sure this ID matches the action declared in your nav_graph.xml." the id of the action is missing a 't' at the end.

It's correct in the following code block, but with a missing 't' in the description.

Steps to reproduce?
As stated above.

Versions
Not applicable.

Additional information
Nil.

Android Basics: Navigation backstack

URL of codelab

  1. Implement Up button behavior

override fun onSupportNavigateUp(): Boolean { return navController.navigateUp() || super.onSupportNavigateUp() }

app crashes when this line is added and the up button is hit

Versions
Android Studio version: Artic Fox 2020.3.1
Pixel 4 XL API 30

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/courses/pathways/android-basics-kotlin-unit-3-pathway-4#codelab-https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel

In which task and step of the codelab can this issue be found?
Task 2. Step 6. Update flavor with user choice

Describe the problem
The provided code for adding a new variable in fragment_flavor.xml gives errors in Android Studio:

<data>
    <variable
        name="viewModel"
        type="com.example.cupcake.model.OrderViewModel" />
</data>

The correct code should be:

<data>
    <variable
        name="viewModel"
        type="com.example.cupcake.OrderViewModel" />
</data>

Versions
Android Studio version: 4.2
API version of the emulator:

Android Basics: Shared ViewModel

URL of codelab

Step 3 Complete the navigation graph

Update title in app bar

Steps to reproduce?

  1. follow the code lab to show title in appbar
  2. run the code
  3. title bar is not updated and back arrow is not showing

Versions
Android Studio version: 4.2.2
API version of the emulator: 30
Screenshot_20211124-170443
Screenshot_20211124-170446
Screenshot_20211124-170449

Additional information
Include screenshots if they would be useful in clarifying the problem. included screenshot

Android Basics: Navigation backstack

URL of codelab
[Navigation and the back stack] https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#4

In which task and step of the codelab can this issue be found?
5. Send the order

Describe the problem
When the order is handed over to another app via clicking the SEND button, after clicking BACK button, I navigate from that app to the Summary fragment. Would rather expect to get back to the Start fragment as the order process is completed.

Steps to reproduce?

  1. Send the order by clicking the SEND button.
  2. When in the external app, click BACK, leave the sender app and you get to the Summary instead of Start fragment

Versions
Android Studio version: 2021.3.1
API version of the emulator: 30

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#2

In which task and step of the codelab can this issue be found?
3. Implement Up button behavior

Describe the problem
After importing the source project [android-basics-kotlin-cupcake-app-viewmodel], the instructions indicate to add an override for the 'onSupportNavigateUp' function.
Upon implementing the lateinit var navController or overriding the fuction, the app crashes when using the 'back' (or up navigate button).

Steps to reproduce?

  1. Run app.
  2. Click on 'One Cupcake' button
  3. Click 'back' on the navigation controller.
  4. Error occurs,
    "E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.cupcake, PID: 5009
    kotlin.UninitializedPropertyAccessException: lateinit property navController has not been initialized
    at com.example.cupcake.MainActivity.onSupportNavigateUp(MainActivity.kt:44)
    at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:235)
    at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
    at androidx.appcompat.widget.ToolbarWidgetWrapper$1.onClick(ToolbarWidgetWrapper.java:188)
    at android.view.View.performClick(View.java:7448)
    at android.view.View.performClickInternal(View.java:7425)
    at android.view.View.access$3600(View.java:810)
    at android.view.View$PerformClick.run(View.java:28305)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7656)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)"

Versions
_Android Studio version:Android Studio 4.1.3
Build #AI-201.8743.12.41.7199119, built on March 10, 2021
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 8
Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin

_API version of the emulator:
30

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found?
in Add Navigation to the flavor and pickup fragments, 2nd point.

Describe the problem
A "t" is missing in the ID
=> R.id.action_flavorFragment_to_pickupFragmen

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Shared ViewModel

https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#6

In which task and step of the codelab can this issue be found?
Step 7

Describe the problem
I'm new to Kotlin and has a very basic knowledge of init block. In step 7, I was instructed to add the init block in the OrderViewModel class and I did it. Suddenly my app started to crash. Then I figured it out that it does matter that where I put the init block. In the init block a method is being called which reference a property of the OrderViewModel class and i put the init block above the properties declarations so i started to get null pointer exceptions. Then I thought to put the init block below the properties declarations and it worked. The issue is You guys should have told the students to put the init block below the properties declarations.

Versions
Android Studio version: doesn't matter
API version of the emulator: doesn't matter

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?authuser=1&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fauthuser%3D1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#6

In which task and step of the codelab can this issue be found?
Task: 7
Step: "Update the layout to display pickup options"

Describe the problem
The text "...view model, update the PickupFragment to display..." should read "...view model, update the fragment_pickup.xml to display..."

Additional information
Include screenshots if they would be useful in clarifying the problem.
Screenshot 2021-04-20 171611

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found?
3. Complete the Navigation Graph

Describe the problem
Pulling down "starter" branch for both this and the last app provides pretty much completed code. Thus the person is learning nothing about how to do things for themselves. In this specific instance, it tells you to start making the navigation graph. Well, the graph is already done for me.

Steps to reproduce?

  1. Go to specified codelab URL AFTER pulling down starter branch code from the repo this issue is located in
  2. open in Android studio
  3. See this issue with starter code already being completed

Versions
Android Studio version: N/A
API version of the emulator: N/A

Additional information
Screen Shot 2021-10-12 at 9 21 01 AM

Android Basics: Shared ViewModel

URL of codelab
https://github.com/google-developer-training/android-basics-kotlin-cupcake-app.git

In which task and step of the codelab can this issue be found?
StartFragment.kt

Describe the problem
private val sharedViewModel: OrderViewModel by activityViewModels()
After inserting this line of code into each fragment as instructed, Android Studio does not recognize the activityViewModels() even after import. The error message reads:

Type mismatch: inferred type is ViewModel but OrderViewModel was expected

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version: arctic fox 2020.3.1 Patch 3
API version of the emulator: 28

Additional information
Include screenshots if they would be useful in clarifying the problem.

image
image

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?authuser=1&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fauthuser%3D1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found?

Describe the problem
I followed everything in the tutorial but when I run the app the labels for the different fragments do not change and the back arrow doesnt show, I even reinstalled android studio thinking something might be wrong with it but nothing changed and I am not sure why, so please look into it.

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version: bumble bee, but that happened even before I updated to bumble bee
Screenshot_20220204_125852

API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem. the screenshot attached is of the second fragment, with label Choose Flavor but as you can see it is still the app name Cupcake

Android Basics: Navigation backstack

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#4

In which task and step of the codelab can this issue be found?
Task 5
sharedViewModel.priceString.value.toString()
should be -> sharedViewModel.price.value.toString()

Describe the problem

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Navigation backstack

URL of codelab
[Navigation and the back stack] https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#5

In which task and step of the codelab can this issue be found?
6. Solution code

Describe the problem
Remove white-spaces surrounding the new line symbol. You get extra white-spaces at the beginning and end of lines otherwise...

Quantity: 12 cupcakes▯
▯Flavor: Vanilla▯
Pickup date: Tue Aug 24▯
▯Total: $24.00▯

▯Thank you!

Steps to reproduce?

  1. SEND the order

Versions
_Android Studio version: 2021.3.1
_API version of the emulator: 30

Additional information
Include screenshots if they would be useful in clarifying the problem.
message

Listener bindings - part of #6

URL of codelab
https://github.com/google-developer-training/android-basics-kotlin-cupcake-app

In which task and step of the codelab can this issue be found?
#6 - Adding android:onClick="@{()...." to radio buttons on the fragment_flavor.xml layout.

Describe the problem
If you select any flavor (I selected "salted caramel", the app terminates with this exception:
java.lang.IllegalStateException: Could not find method @{() -> viewModel.setFlavor(@string/salted_caramel)(View) in a parent or ancestor Context for android:onClick attribute defined on view class com.google.android.material.radiobutton.MaterialRadioButton with id 'salted_caramel'

Steps to reproduce?

  1. Add the listener bindings to the fragment_flavor.xml layout
  2. Build and run the app
  3. Select a quantity on 1st fragment screen
  4. Select ANY flavor on the 2nd fragment screen
  5. You'll get the above error

Versions
Studio Build: AI-211.7628.21.2111.8193401
Version of Gradle Plugin: 7.1.2
Version of Gradle: 7.2
Version of Java: Could not find a JAVA version anywhere, but found this: default JDK: 11.0.11
OS: Windows 10
Kotlin Plugin: JetBrains 211-1.6.10-Release-923-AS7442.40

Additional information
Include screenshots if they would be useful in clarifying the problem.
ListenerBindingsGoogleCodeLab

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#7

In which task and step of the codelab can this issue be found?
Task 8 Step 4

Describe the problem
When testing the app, the same day pickup charge is being applied on the "Choose Flavor" screen. This is due to resetOrder() being called in the init block setting the _date value to dateOptions[0] which is always today. The code needs to either exclude _date in resetOrder() and check the first radio button automatically only when going into the "Choose Pickup Date" screen or the updatePrice() will need to be updated with a flag to differentiate whether setQuantity() or setDate() called updatePrice().

For example if setDate() calls updatePrice() and passes in a flag value of TRUE then that flag can be added to the IF condition to apply the same day pickup charge.

Steps to reproduce?

  1. Run the App from the solution code in Task 10
  2. Click any of the buttons on the Cupcake screen
  3. You will see the subtotal automatically applies the $3 fee for same day pickup before a date was selected.

Versions
_Android Studio version: Android Studio Arctic Fox | 2020.3.1 Patch 3
_API version of the emulator: 30

Additional information
Include screenshots if they would be useful in clarifying the problem.
Android Basics Error

Solution Code missing test suite

URL of codelab

In which task and step of the codelab can this issue be found?
Unit 3: Pathway 4: Advanced navigation app examples

Describe the problem
In step 7 there is a link to the solution code, but the JUnit test classes are missing or the link is wrong

Android Basics: Shared ViewModel

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel#6

In which task and step of the codelab can this issue be found?
"9. Run your app again, notice today's date is selected by default."

Describe the problem
After adding the init block and removing the initial values, it showed the NullPointerException error, as quoted below.

"7. Add an init block to the class, and call the new method resetOrder() from it."
"8. Remove the initial values from the declaration of the properties in the class. Now you are using the init block to initialize the properties when an instance of OrderViewModel is created."
"9. Run your app again, notice today's date is selected by default."

The error in Logcat:
java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.MutableLiveData.setValue(java.lang.Object)' on a null object reference
at com.example.cupcake.model.OrderViewModel.resetOrder(OrderViewModel.kt:56)
at com.example.cupcake.model.OrderViewModel.(OrderViewModel.kt:11)

Steps to reproduce?
As stated above.

Versions
Android Studio version: 4.2.1
API version of the emulator: 30

Additional information
Nil.

org.junit.ComparisonFailure with NBSP in price Testing

URL of codelab
https://developer.android.com/codelabs/android-basics-kotlin-test-viewmodel-and-livedata?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fandroid-basics-kotlin-test-viewmodel-and-livedata#5

In which task and step of the codelab can this issue be found?
Task in Part 6 "Write ViewModels and LiveData"

Describe the problem
Test Errors, Comparison Failure, NBSP

Steps to reproduce?

  1. Go to... Android Studio
  2. Click on: ViewModelTests.kt, Start Test Code
  3. See error:
expected:<[$27,00]> but was:<[27,00 Br]>
Expected :$27,00
Actual   :27,00 Br

and Comparison Failure
27,00NBSPBr

Versions
Android Studio version: Bumblebee 2021.1.1 Patch 2
API version of the emulator: Test Configuration

Additional information
Include screenshots if they would be useful in clarifying the problem.
Снимок экрана 2022-03-19 в 09 48 13
Снимок экрана 2022-03-19 в 09 47 54

Android Basics: MORE STARTER CODE ERRORS, ANOTHER PROJECT! CUPCAKE

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?authuser=1&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%3Fauthuser%3D1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found?

STEP 3

This is the Cupcake app. This is the 4 starter project with a error and no way to import it!
I am not doing anymore Android studio until you fix your projects.

Describe the problem

see the screen shots. what is red has no way to import, so what am I supposed to do? Can you add it? I have other emails with other started projects I can't do because they are full of errors!

Screen Shot 2022-02-07 at 2 16 28 PM

Screen Shot 2022-02-07 at 2 16 35 PM

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

Android Basics: Shared ViewModel

URL of codelab
https://github.com/google-developer-training /
android-basics-kotlin-cupcake-app

In which task and step of the codelab can this issue be found?
9. Setup click listeners using listener binding

Describe the problem
In the layout xml files for fragment_flavor.xml and fragment_pickup.xml, the lines
android:onClick="@{() -> flavorFragment.goToNextScreen()}"
android:onClick="@{() -> pickupFragment.goToNextScreen()}"
do not compile. "goToNextScreen() results in "Cannot find identifier".

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...
    Screenshot 2022-02-10 011439

Versions
Android Studio version:
API version of the emulator:
Bumblebee 2021.1.1 Patch 1
Build # AI-211.7628.21.2111.8139111 on Feb 1, 2022

Additional information
Include screenshots if they would be useful in clarifying the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.