2
I’m trying to use the Data Binding on Android.
For this I added the classpath in the application:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0-beta3'
classpath 'com.android.databinding:dataBinder:1.0-rc4'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'
But when I try to compile the following error occurs:
Error:Unable to find method 'android.databinding.tool.LayoutXmlProcessor.(Ljava/lang/String;Landroid/databinding/tool/writer/JavaFileWriter;IZLandroid/databinding/tool/LayoutXmlProcessor$OriginalFileLookup;) V'. Possible causes for this Unexpected error include:
In the case of Corrupt Gradle processes, you can also Try closing the IDE and then Killing all Java processes.
- Gradle’s dependency cache may be Corrupt (this sometimes occurs after a network Connection timeout. ) Re-download dependencies and Sync project (requires network)
- The state of a Gradle build process (daemon) may be Corrupt. Stopping all Gradle daemons may Save this problem. Stop Gradle build processes (requires Restart)
- Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
I don’t know if it’s really necessary to add this information, but when I try to compile just by enabling databinding:
dataBinding {
enabled true
}
Occurs the following :
Error:(23, 23) No Resource type specified (at 'text' with value @{user.name}').
Someone has used this feature successfully?