【发布时间】:2020-07-07 22:08:46
【问题描述】:
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
【问题讨论】:
-
检查你的 XML,你可能在某处有错误
-
我发现了一些东西,问题是我的包名有大写字母,如 com.ExampPle,这就是为什么我的数据绑定不起作用,所以有什么解决方案吗?
-
为什么你认为这是原因?关于包名,你可以简单地重命名它
-
是的,我重命名了它,但我的应用程序在 playstore com.ExamPle 上,现在我已经做了 com.example,现在我的问题是我是否可以用这个新的包名称更新我的应用程序。
-
您可以更新您的软件包名称,但请确保 build.gradle 中的“applicationId”与 playstore id (com.ExampPle) 保持相同。
标签: android android-studio kotlin data-binding android-databinding