Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Android Basics: tip-calculator #168

@cunzwincun

Description

@cunzwincun

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

In which task and step of the codelab can this issue be found?
Enable view binding
Open the app's build.gradle file ( Gradle Scripts > build.gradle (Module: Tip_Time.app) )
In the android section, add the following lines:

buildFeatures {
viewBinding = true
}
Note the message Gradle files have changed since last project sync.
Press Sync Now.
aa49f2389f1d1b19.png

After a few moments, you should see a message at the bottom of the Android Studio window, Gradle sync finished. You can close the build.gradle file if you want.

Describe the problem
After I press sync now, there is error which said:
Could not find method buildFeatures() for arguments [build_6hbjfzkgik4klt1kynznmzit6$_run_closure1@55a48724] on project ':app' of type org.gradle.api.Project

image

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.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions