I'm getting this annoying error when I've updated to Android Studio 3.2.1 (Stable)
Although not all of the binding files were affected, only some of them. I've checked out tutorials on data binding and also this link : Cannot find symbol DataBindingComponent on Android Studio 3.2 Canary 16 Kotlin project
But I wasn't able to find a solution, I created handlers for methods, set dataBinding to 'true' in the app gradle, also added annotationProcessor "android.databinding:databinding-compiler:3.2.0-alpha10"
I'm using Java (not Kotlin) in my project.
And my project uses the 'inflate' and 'setContentView' from the DataBinding class (without the DataBindingComponent option) but it still says cannot find symbol class DataBindingComponent
Example :
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SPManager.save(this, SPManager.kIsChatActivityOpened, true);
binding = DataBindingUtil.setContentView(this, R.layout.activity_chat);
viewModel = new ChatActivityViewModel(binding, this);
binding.setViewModel(viewModel);
Been stuck on this for awhile now and I can't get on with the project because I can't even build it.
Error :
{file path}.java:307: error: cannot find symbol
@Nullable DataBindingComponent component) {
^ symbol: class MyClass location: class MyBinding
Need help