databinding-samples
databinding-samples copied to clipboard
too many bug at different gradle version
gradle 7.0 ,databindutil not exist ,unless use
// implementation 'androidx.databinding:library:3.2.0-alpha11'
// implementation 'androidx.databinding:databinding-runtime:7.0.0'
and tip need set { databinding true} but i delete xml everything is ok!
use gradle 4.2 tip Could not find androidx.databinding:viewbinding:4.2.0.
//Could not find androidx.databinding:viewbinding:4.2.0.
implementation 'androidx.databinding:databinding-common:4.1.3'
// implementation 'androidx.databinding:library:3.2.0-alpha11' // implementation 'androidx.databinding:databinding-runtime:7.0.0'
can you introducde it how to work ,this library
why so set
buildFeatures{
dataBinding {
enabled = true
}
}
not find databindutil, and util
ndroid.databinding.tool.processing.ScopedException: [databinding] {"msg":"Found \u003clayout\u003e but data binding is not enabled.\n\nAdd buildFeatures.dataBinding \u003d true to your build.gradle to enable it.","file":"C:\\project\\SoTrun\\app\\src\\main\\res\\layout\\fragment_my.xml","pos":[]}
at android.databinding.tool.util.L.tryToThrowScoped(L.java:98)
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
classpath "com.android.tools.build:gradle:7.0.0"
build.grade enable =true has set, problem is set xml node cause error