Cannot resolve class issue in multiple .xml files
License and Copyright Notice
By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).
Summary
When Binding is implemented for the project the list_item.xml, list_item_row.xml, activity_scanner.xml and activity_upc_scanner.xml files cause "Cannot resolve class" error and crash the application. This is because the binding classes that gets created for these layouts tries to import the views used in the layouts and cause package does not exist error, and stops the application before starting. @moniquejohnson helped me to confirm this issue is not only on my end, but it's a general issue.
Steps to reproduce
The developer can either check if he/she has tags with red color in the mentioned layout files, or enable viewBinding and see if an error occurs during the rebuilding of the project.
What is the current bug behavior?
if viewBinding enabled during the rebuilding the project or running the application, Android Studio throws multiple package does not exist error.
What is the expected correct behavior?
No error caused by binding files and application running as expected.
Relevant logs and/or screenshots
The errors you get if you try to rebuild the project with viewBinding enabled.
The tag that cause "Cannot resolve class" issues in the list_item.xml and list_item_row.xml.
The tag that cause "Cannot resolve class" issues in the activity_scanner.xml and activity_upc_scanner.xml.
Possible fixes
The tags that cause the problem in list_item.xml and list_item_row.xml can be fixed easily by replacing the red tag with <androidx.constraintlayout.widget.ConstraintLayout
The scanner views that cause the problem going to be commented out for future.
Labels
(We have not finalized our list of labels, for now, include the labels you would like to include as a comment.