seyed Jafari
seyed Jafari

Reputation: 1265

Where is ViewBinding GeneratedCode

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.

Upvotes: 11

Views: 3285

Answers (5)

NickUnuchek
NickUnuchek

Reputation: 12847

The name of the generated class for my_layout.xml is MyLayoutBinding.java. so you can find the implementation in MyProject/app/build/intermediates/javac/googleDebugStage/classes/you_package/databinding

Upvotes: 0

lrnrzg
lrnrzg

Reputation: 71

  1. open terminal enter image description here

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

enter image description here

Upvotes: 4

Somesh Kumar
Somesh Kumar

Reputation: 8638

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

Upvotes: 23

beigirad
beigirad

Reputation: 5714

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

Upvotes: 1

Ramin Abdolmaleki
Ramin Abdolmaleki

Reputation: 189

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

Upvotes: 0

Related Questions