Where is ViewBinding GeneratedCode

Viewed 2010

How/Where Can I find the generated code for ViewBinding?

whenever I try control+click/control+b to see the declaration, AndroidStudio just opens the XML layout.

4 Answers

The generate binding classes reside in app > build > generated > data_binding_base_class_source_out > debug > your app package > databinding

A you can see in the following screenshot all my ViewBinding classes for XML layout are inside the above path

Screeen shot of generated classes path

  1. open terminal enter image description here

  2. type find . -iname "*binding.java"

enter image description here

You can use the Ctrl + Shift + N (Go to file) to find the file with BindingImpl suffix.

The name of the generated class for your_layout.xml is YourLayoutBindingImpl.java. so you can find the implementation using double-shift.

Related