Android Studio 2.3 Issues With Databinding

I recently updated to Android Studio 2.3 which now includes gradle plugin 3.3.

After upgrading I tried compiling and ran into issues with one of the classes that had data binding implemented. I came across data binding errors that looked like:

error: package com.myproject.com.databinding does not exist

Through some research I was able to get the error resolved by adding the following to dependencies :

dependencies {

apt ‘com.android.databinding:compiler:2.3.0’

}

I’ve also read that the com.neenbedankt.android-apt plugin should also be removed after upgrading to gradle 2.3 or higher, so if you have this plugin remove it from your app gradle file. It usually appears at the tope of the file as:

apply plugin: ‘com.neenbedankt.android-apt’

Make sure it is removed. Hope this helps out anyone else with similar issues.

3 Responses so far.

  1. […] View the article: Fix For databinding in Android Studio 2.3 […]

  2. james justin says:

    I am using 2.0. how can i upgrade 2.0 to 2.3

    • Tim says:

      Have you tried upgrading from within Android Studio, using the in app update notification alert? Are you utilizing data binding in your source code?

Leave a Reply