'Android View Binding problem ,public class name and and file name is different

screenshot of layout file Link of the screen shot click here

FoodItemBinding.java file is generated by compiler , how the public class name and file name is different here, also i m not able to change it.

Check the Screenshot Attched

error: class FoodItemBinding is public, should be declared in a file named FoodItemBinding.java
public final class FoodItemBinding implements ViewBinding {
         ^


Solution 1:[1]

Name the layout file food_item.xml instead of fooditem.xml

ViewBinding generates the java file as FooditemBinding but the class is still named FoodItemBinding, hence the issue of class name.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1