The problem is that this line of code is producing an error:
1 2 |
binding = DataBindingUtil.setContentView(this, R.layout.activity_main) |
And the error says:
Type mismatch.
Required:
ActivityMainBinding
Found:
ViewDataBinding!
The solution is to add a <layout>
tag in the layout file that you are inflating!