I am trying to use the android data binding plugin without the knowledge so far.
I use: Gradle 2.2.1; Intellij IDEA 15.
Build.gradle project level:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath "com.android.databinding:dataBinder:1.0-rc2"
}
}
allprojects {
repositories {
jcenter()
}
}
Build.gradle module:
apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'
buildscript {
repositories {
jcenter()
}
dependencies {
}
}
repositories {
jcenter()
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.app4.app4"
minSdkVersion 10
targetSdkVersion 10
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
}
I got a few different errors when trying to change the plugin version; The error I am getting now is "Error: Gradle: There was a problem setting up the project: app4".
Failed to notify listener on project evaluation. android.databinding.tool.LayoutXmlProcessor (Ljava / languages ββ/ String; Landroid / data binding / tool / records / JavaFileWriter; IZLandroid / data binding / tool / LayoutXmlProcessor $ OriginalFileLookup;). IN "
source
share