Error when i use layout tag in databinding in xml android project

Viewed 4487
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
   > java.lang.reflect.InvocationTargetException (no error message)
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
Caused by: java.lang.reflect.InvocationTargetException
Caused by: org.jetbrains.kotlin.kapt3.base.util.KaptBaseError: Exception while annotation processing
Caused by: java.lang.IllegalArgumentException: couldn't make a guess for databinding.ActivityStartPageBindingImpl

3 Answers

Had a similar issue after upgrading the Kotlin version to 1.4 in my project. Downgrading to ext.kotlin_version to '1.3.50' fixed the issue. Apparently the kapt plugin in gradle 4.1.1 doesn't fully support databinding yet in this kotlin version.

Had same error and error because of package name is capital latter, So after make is small its working

I had the same problem in Android Studio version 4.1.1. I fixed this problem by updating the Android Studio to version 2020.3.1. Just try to update Android Studio.

Related