Update AS/Kotlin now get data binding build error


#1

I updated to AS 2.3 today after updating to Kt 1.1 recently. Now I get errors on DataBindingInfo.java. Any tips? Also, just realized, build tools were updated to 25.

:app:compileDebugAndroidTestJavaWithJavac
/Users/julian/AndroidStudioProjects/Twinkle/app/build/generated/source/dataBinding/androidTest/debug/android/databinding/layouts/DataBindingInfo.java:5: error: cannot find symbol
@BindingBuildInfo(buildId=“df75fb81-654e-4fc2-bb46-5563ef35f27d”, modulePackage=“letstwinkle.com.twinkle.test”, sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)
^
symbol: method modulePackage()
location: @interface BindingBuildInfo
/Users/julian/AndroidStudioProjects/Twinkle/app/build/generated/source/dataBinding/androidTest/debug/android/databinding/layouts/DataBindingInfo.java:5: error: cannot find symbol
@BindingBuildInfo(buildId=“df75fb81-654e-4fc2-bb46-5563ef35f27d”, modulePackage=“letstwinkle.com.twinkle.test”, sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)
^
symbol: method sdkRoot()
location: @interface BindingBuildInfo
/Users/julian/AndroidStudioProjects/Twinkle/app/build/generated/source/dataBinding/androidTest/debug/android/databinding/layouts/DataBindingInfo.java:5: error: cannot find symbol
@BindingBuildInfo(buildId=“df75fb81-654e-4fc2-bb46-5563ef35f27d”, modulePackage=“letstwinkle.com.twinkle.test”, sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)
^
symbol: method layoutInfoDir()
location: @interface BindingBuildInfo
/Users/julian/AndroidStudioProjects/Twinkle/app/build/generated/source/dataBinding/androidTest/debug/android/databinding/layouts/DataBindingInfo.java:5: error: cannot find symbol
@BindingBuildInfo(buildId=“df75fb81-654e-4fc2-bb46-5563ef35f27d”, modulePackage=“letstwinkle.com.twinkle.test”, sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)

symbol: method exportClassListTo()
location: @interface BindingBuildInfo
/Users/julian/AndroidStudioProjects/Twinkle/app/build/generated/source/dataBinding/androidTest/debug/android/databinding/layouts/DataBindingInfo.java:5: error: cannot find symbol
@BindingBuildInfo(buildId=“df75fb81-654e-4fc2-bb46-5563ef35f27d”, modulePackage=“letstwinkle.com.twinkle.test”, sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)

symbol: method isLibrary()
location: @interface BindingBuildInfo
/Users/julian/AndroidStudioProjects/Twinkle/app/build/generated/source/dataBinding/androidTest/debug/android/databinding/layouts/DataBindingInfo.java:5: error: cannot find symbol
@BindingBuildInfo(buildId=“df75fb81-654e-4fc2-bb46-5563ef35f27d”, modulePackage=“letstwinkle.com.twinkle.test”, sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)

symbol: method minSdk()
location: @interface BindingBuildInfo
/Users/julian/AndroidStudioProjects/Twinkle/app/build/generated/source/dataBinding/androidTest/debug/android/databinding/layouts/DataBindingInfo.java:5: error: cannot find symbol
@BindingBuildInfo(buildId=“df75fb81-654e-4fc2-bb46-5563ef35f27d”, modulePackage=“letstwinkle.com.twinkle.test”, sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)

symbol: method enableDebugLogs()
location: @interface BindingBuildInfo
/Users/julian/AndroidStudioProjects/Twinkle/app/build/generated/source/dataBinding/androidTest/debug/android/databinding/layouts/DataBindingInfo.java:5: error: cannot find symbol
@BindingBuildInfo(buildId=“df75fb81-654e-4fc2-bb46-5563ef35f27d”, modulePackage=“letstwinkle.com.twinkle.test”, sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)

symbol: method printEncodedError()
location: @interface BindingBuildInfo
Note: /Users/julian/AndroidStudioProjects/Twinkle/app/src/androidTest/java/letstwinkle/com/twinkle/ApplicationTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 errors

The contents of this file:

package android.databinding.layouts;

import android.databinding.BindingBuildInfo;

@BindingBuildInfo(buildId="df75fb81-654e-4fc2-bb46-5563ef35f27d", modulePackage="letstwinkle.com.twinkle.test", sdkRoot="/Volumes/A/androidsdk",layoutInfoDir="/Users/julian/AndroidStudioProjects/Twinkle/app/build/intermediates/data-binding-info/androidTest/debug",exportClassListTo="",isLibrary=false,minSdk=19,enableDebugLogs=false,printEncodedError=true)
public class DataBindingInfo {}

#2

Hi I have similar error before, add this line to your build.gradle
apply plugin: 'kotlin-kapt’
it works for me


#3

Ok thanks.
BTW I also needed to do ‘rebuild project’ before error went away