Enable --stacktrace, --info, --debug, or --scan in Android Studio Gradle build

I am getting a build error in Android Studio while running the task dataBindingGenBaseClassesDebug.

To get more information, I need to run the command with either --stacktrace, --info, --debug or --scan option.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dataBindingGenBaseClassesDebug'.
> couldn't make a guess for com.example.newmvvm.ListViewModel.listViewModel

* 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

11 actionable tasks: 1 executed, 10 up-to-date

The build error is caused by the task dataBindingGenBaseClassesDebug in Android Studio. To get more information on the error, run the command with either --stacktrace, --info, --debug or --scan option. For example, run ./gradlew dataBindingGenBaseClassesDebug --stacktrace to get the stack trace.