I am trying to enable View Binding on a project and I have this error:
Cannot access 'no_name_in_PSI_3d19d79d_1ba9_4cd0_b7f5_b46aa3cd5d40' which is a supertype of 'com.kevinabrioux.ping.databinding.ActivityStartingBinding'. Check your module classpath for missing or conflicting dependencies
This is where my error appear:
I have activate viewbinding in my gradle:
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.kevinabrioux.ping"
minSdkVersion 29
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding = true
}
}
In my case this was happening because I had pasted in the
<layout>
tag in my XML and I wasn't using databinding.Removing the
<layout>
tag fixed the problem.