I'm trying to learn databinding and a strange error is occurring when I try to build:
Error:(8, 54) error: package br.com.aulas.vitor.cadastrodecarro.databinding does not exist
My Build.gradle looks like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "br.com.aulas.vitor.cadastrodecarro"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
dataBinding {
enabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}
An error occurs on the line:
import br.com.aulas.vitor.cadastrodecarro.databinding.ActivityMainBinding;
I tried the Clean and Make Project but it still did not work.
The error only occurs when I try to run or run Make Project.
I had already done other projects to learn databinding and this error never occurred.
I'm using Windows 10