Я использую привязку данных Android, но BR не может быть решена
вот мой манекен, вид модели
Я включил привязку данных в моем приложении
dataBinding {
enabled = true
}
Свойства gradle-wrapper.properties, имеющие:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
Вот моя модель просмотра
public class DummyViewModel extends BaseObservable {
private int mSomeValue = 0;
public void setValue(int value) {
mSomeValue = value;
//Here BR can not be resolved
notifyPropertyChanged(com.something.myapplication.BR.positive);
}
@Bindable
public boolean isPositive() {
return mSomeValue > 0;
}
}
Здесь classPath Project gradle
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Android Studio version: 3.4