I\'m working on an Android application with databinding but I\'ve always next error:
Error: Package
my.package.databinding
I came across this issue in a project of 4 modules in Android Studio 2.3, it is what @F43nd1r indicated, but want to document what I did to resolve this in my case.
One of the 4 modules had an older Android Support library in in the Gradle file for it, while the other 3 were current. This is what prevented the project from compiling properly and causing the databinding error.
The difficult part was that you don't know about this unless you open each build.gradle
file and see if there is an error displayed. It did NOT show an error for it on compile.
Effectively I updated this area to the newer version number to match the other 3 module build.gradle
files.
dependencies {
...
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
...
}