package com.google.android.gms.samples.wallet.databinding does not exist

Viewed 182

I'am following a tutorial from here https://github.com/google-pay/android-quickstart , i downloaded the code and try to run it but it complains about

 package com.google.android.gms.samples.wallet.databinding does not exist

which is logically true , as the package does not exist , but i assume downloading from the official site i should not be facing such problem.

I have not changed anything from the link i just downloaded and ran it in my Android studio. how do i resolve this?? Please help.

Versions

Android Studio version : 4.01
Android Version : 7.1.2
google-play : 2020.10.22037

1 Answers

I contacted Google for the same issue, and was told

The class is generated from View binding. View binding is enabled from build.gradle (you can find it from github as well)

viewBinding {
    enabled = 
    true
}

And given this link to the relevant documentation.

Related