0

My code was working fine in Android Studio version 2.3, i did update to new and latest version 3.0 and start getting the error on a working code :

Error:(1, 0) android/databinding/tool/DataBindingBuilder

This is the app level build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
    applicationId "com.webapp"
    minSdkVersion 15
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dataBinding {
    enabled = true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}

can anyone help me to resolve this issue.

Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65

1 Answers1

0

I am posting this answer as it works for me may it help others,Updating project level build gradle classpath from older to latest build gradle latest version i.e from 2.3.3 to 3.0.0 works for me and DataBindingBuilder error gets resolved

project level build.gradle:

buildscript {
repositories {
    jcenter()
}
dependencies {
 //   classpath 'com.android.tools.build:gradle:2.3.3' compiling code with older gradle version in updated/latest gradle version shows DataBindingBuilder error
    classpath 'com.android.tools.build:gradle:3.0.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}
Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65