I have a multi-module project where I set my databinding classes as a generic type requirement:
public abstract class BaseActivity<DataBinding extends ViewDataBinding> {
//Rest of the code...
}
However, if I extend this activity on a submodule, sometimes I get the following build error:
error: cannot find symbol public void myMethod(MyActivityBinding dataBinding) {
error: package com.mydomain.databinding does not exist import com.mydomain.databinding.MyActivityBinding;
Sometimes, creating another activity that extends from MyActivity
and putting it on the main app module fixes the issue. But in some cases I can't pinpoint the problem, and I consistently get the same error message.
I already tried cleaning and rebuilding the project and also invalidating Android Studio cache and restarting it without success.
Any ideas on how to at least investigate what could be causing this problem?