【发布时间】:2020-09-19 17:09:44
【问题描述】:
突然间我开始收到这个错误,我不明白为什么如果有人让我知道这个错误在哪里,就会有足够的帮助。由于 android studio 的新更新,我能得到的就是这个。 我得到的错误的详细摘要。
Task :app:kaptDebugKotlin
ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for parser compilation does not match the current runtime version 4.7.1ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for parser compilation does not match the current runtime version 4.7.1C:\Users\shubh\Downloads\MarginCalculator\app\build\generated\source\kapt\debug\com\kotlin_developer\margincalculator\DataBinderMapperImpl.java:10: error: cannot find symbol
import com.kotlin_developer.margincalculator.databinding.FragmentCalculatorScreenBindingImpl;
symbol: class FragmentCalculatorScreenBindingImpl
Task :app:kaptDebugKotlin FAILED
location: package com.kotlin_developer.margincalculator.databinding
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)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
29 actionable tasks: 27 executed, 2 up-to-date
【问题讨论】:
-
请在
build.gradle文件中显示您的代码。 -
请同时显示 DataBinderMapperImpl.java 代码。
-
你更新到 Android Studio 4 了吗?同样的铅
-
我更新到 Android Studio 4 并且在使用 Room 时遇到了同样的错误,我可以通过更改我的一个查询来临时修复它。我最初有这个查询:“SELECT case_name FROM SavedCases”,然后将其更改为“SELECT * FROM SavedCases”,错误消息消失了。出于某种原因,当我尝试仅查询特定列时,我只会收到此错误。这不是解决问题的理想方法,我希望有人有更好的解决方法。
-
我遇到了类似的错误,并找到了适合我的解决方案。你可能做过类似的事情。 stackoverflow.com/questions/63133657/…
标签: android android-studio kotlin