Cannot resolve symbol 'ResultProfileBinding'
Asked Answered
L

3

46

Good day, I'm just upgrading my android studio to the latest version (3.6.1) and I'm just want to try the new features of version 3.6.1 which is the ViewBinding. I followed the setup instruction from this site https://developer.android.com/topic/libraries/view-binding?utm_medium=studio-assistant-stable&utm_source=android-studio-3-6 but I don't know why I'm still having this error: Cannot resolve symbol 'ResultProfileBinding'

enter image description here

Here is what I've done. But still getting that cannot resolve symbol error.

enter image description here enter image description here enter image description here

My android studio 3.6.1 is the latest stable version that I've downloaded from the official website and the viewbinding feature is on the list of new features of this version so I am sure that I am missing something. Does anyone know how to solve this?

Lonergan answered 1/3, 2020 at 12:5 Comment(0)
W
127

It's based on your layout file name. If your layout's filename is activity_language.xml then your binding class would be ActivityLanguageBinding.

Weichsel answered 1/3, 2020 at 18:45 Comment(3)
Yes, it works! my mistake was I didn't read the first part of the page developer.android.com/topic/libraries/… which is they mention your answer.Lonergan
everyone has who landed here was using ResultProfileBinding :-DPause
from the docs The name of the binding class is generated by converting the name of the XML file to camel case and adding the word "Binding" to the end.Fijian
R
1

you can find the file in

project_dir/app/build/generated/data_binding_base_class_source_out/debug/out

Remissible answered 25/12, 2021 at 11:45 Comment(0)
C
0

I had the same issue with Fragment layout file: fragment_xyz.xml

The auto complete will do the rest for start typing XyzFragmentBinding...

Congregationalist answered 4/10, 2020 at 11:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.